seemingly off topic but not really

Bruce M. Simpson bms at FreeBSD.org
Tue Jun 3 06:40:35 UTC 2008


Julian Elischer wrote:
> Julian Elischer wrote:
>> Does anyone know of a program that knows C syntax, and can rename a 
>> variable across a set of files without screwing up the comments etc.?
>>
>> I vaguely remember seeing such a program once...
>
> hmm Cscope might do the trick.. ...

Whilst KScope (the KDE front-end for cscope) is a very capable source 
browser which I use on a daily basis to get things done, it isn't a 
fully-fledged refactoring browser.

KScope is great because you can just install it on a desktop with KDE, 
open a dialog box, and import source into a new project. You can use it 
as your IDE. Whilst I don't use it as an IDE, I usually have it open 
when I'm using VIM for most of my editing.

It doesn't handle macros so well however; I believe this is a limitation 
of the CScope index engine. Take humour at the irony that this is in 
fact an SCO product. Look at the source if you don't believe me.

I tried CScout about a year ago, and I found it didn't work for me. It 
takes a bit more setup than KScope does and I found the user interface 
cumbersome. I also tried Gonzui, but I was put off by the Java 
dependencies needed. I'm sure CScout has a lot of technical merits, and 
probably does better with macros.

The thing with refactoring is, doing it right is Hard. It is relatively 
easy by comparison to implement it for languages like Java and C#, 
slightly less so for Python, and even less so for C++.



More information about the freebsd-current mailing list