Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Suggestion

Reply
Thread Tools

Suggestion

 
 
Phlip
Guest
Posts: n/a
 
      09-07-2004
Aguilar, James wrote:

> Phlip wrote:


> > It's the first feature of a "refactoring browser" - rename identifier.

To
> > learn how "easy" that is, search the net for a refactoring browser for
> > C++.

>
> I'm making an assumption here that might not be correct, so correct me if
> I'm wrong -but- I assume that you are trying to imply that it is not easy

(I
> don't really want to use my time to search for such a browser right now,
> since I personally have no use for it at the moment). Maybe you can

explain
> why?


I have never tried it. However...

> In any case, here's my idea for an algorithm:
>
> ALGORITHM :
>
> Inputs: Method signature, set of type name,
> directory name *possibly blank for base level call*
> Vars: boolean valid (begins false)
> Returns: boolean
> WHILE (valid) {
> 0. valid = true;
> 1. Get all files in this folder **PLATFORM DEPENDENT**
> a. remove all files that do not end in extension .cc or .hh (GNU

naming
> conventions)
> 2. For each file
> a. Continue to eat input until you come to end of file or come to ":
> public
> \member of set/" or "\methSig&member of set/" (use tokens to

process
> the input,
> basic stuff)
> b. If you come to the case described in 2a., valid becomes false and

do
> step 3,
> otherwise, step four
> 3. Edit "\methSig/" as appropriate and write the file
> 4. Get list of directories and recurse. If any recursive call returns
> false, valid is
> set to false.
> }
>
> : ALGORITHM


The first time that algorithm renames an innocent bystander, you will feel
bad, and stop using it.

When folks use a refactoring browser in a softer language that permits them,
they fly, because the browser cannot make a mistake.

My C++ code routinely screws up the intellisense and code browsing system in
my Visual Studio editors. They use "just a little language parser" like you
recommend. They don't use the real C++ compiler's program database, because
they want to change their browsing on the fly as I add statements. So we get
the worst of both worlds. My intellisense breaks when the wind blows, and my
browser can't find variables that the compiler can.

If a C++ refactoring browser were this unstable, nobody could tell when it
was adding bugs, so nobody would use it.

--
Phlip
http://industrialxp.org/community/bi...UserInterfaces


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless Access Point Suggestion =?Utf-8?B?UyBMYW5l?= Wireless Networking 2 06-24-2005 10:39 PM
Suggestion for a new name, logo and slogan for the Mozilla Suite... Charles Firefox 2 03-12-2005 04:31 AM
"Read-only" version of Mozilla? (suggestion for a new software idea) Hallvard Tangeraas Firefox 4 01-12-2005 07:24 PM
FireFox-opening new tabs, a suggestion me Firefox 3 09-21-2004 04:19 PM
Re: Suggestion for Cache flush in Moz Caffeine Junkie Firefox 1 01-20-2004 06:06 AM



Advertisments