About one class/function per module

Peng Yu pengyu.ut at gmail.com
Mon Nov 2 22:22:25 EST 2009


On Mon, Nov 2, 2009 at 7:41 PM, Lee <leeyuan123 at gmail.com> wrote:
> On Nov 2, 7:06 pm, Peng Yu <pengyu... at gmail.com> wrote:
>> On Mon, Nov 2, 2009 at 9:02 AM, Jean-Michel Pichavant
>>
>>
>>
>>
>>
>> <jeanmic... at sequans.com> wrote:
>> > Diez B. Roggisch wrote:
>>
>> >> Peng Yu wrote:
>>
>> >>>  I can navigate to the definition of
>> >>> class and function by vim + ctags,
>>
>> >> Start learning a decent editor (emacs is mine) which allows you to deal
>> >> with all of your perceived "problems"
>> >> Diez
>>
>> > This is a declaration of war against the vi community. We won't give up,
>> > prepare for vengeance !
>> > By the way, why the hell would someone wants to limit itself to one function
>> > per file, file names would be probably related to the function name, that
>> > would make changing function name a nightmare, not mentiong the history
>> > issues when using version control systems. Definitely a bad idea.
>>
>> I use vi rather than emacs. I stick to vi because I stated with vi and
>> I don't what to use both editors but only at an amateur level.
>>
>> With some automated script, I don't think it is a nightmare to change
>> function names. I can change function names and filenames and their
>> reference with a simple command.
>>
>> I'd think that this is the limitation of current version control
>> system. I don't aware of any version control system that allows easy
>> change of filenames. But why such features can not be implemented in
>> the version control system?
>
> Because then the version control system would have to implicitly
> identify the original names for files that have changed names...
> Think about it, if you change the name of one file, the system should
> theoretically be able to accurately identify the original filename and
> make the corresponding changes to its database. But if you were to
> simultaneously change the names of many files, then there's no
> possible way for the system to determine which names belongs where...
> I think you can see where I'm going with this.

I don't think that this is a problem that can not be overcome. A
simple solution might be to associate a unique identifier to each
file, so that even the filename has been changed, the new version and
the old version can still be identified as actually the same file.



More information about the Python-list mailing list