help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] .st file naming


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] .st file naming
Date: Fri, 03 Apr 2015 22:32:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 03/04/2015 13:07, Jan Vrany wrote:
> while playing with GST, I found bit difficult to navigate 
> through code. For example, source code for class Exception 
> is in file kernel/ExcHandling.st. So I have to grep all the time. 
> 
> I wonder why is it so? Wouldn't it be better to have one file
> per class name, like in Java?

Even in Java this is not completely true, as you have inner classes.

In GNU Smalltalk most classes have a 1:1 correspondence with files.  In
the case of ExcHandling.st, the reason why you have two files is
historical---that file used to have the whole implementation of
instance-based (IBM Smalltalk) exceptions, including bits now in
BlkClosure.st.  Splitting it in Exception.st and ExceptionSet.st would
make a lot of sense, and there are probably some similar cases elsewhere.

When splitting files one could take the occasion for creating
subdirectories of kernel/ as well.

At the same time, I think it would be pointless to split AnsiExcept.st
in 40 or 50 files.  Sure, you can, but the kernel GNU Smalltalk code is
not meant to be edited in a browser, since it needs to redefine some
methods during initialization and the order of the doits (Evals) is very
important too.

That said, the 14 character limitation is completely obsolete and it's
certainly okay to make file names longer if desired.

> Similar scheme is used in Smalltalk/X
> and works just fine. 
> Also this would make tool implementation a lot easier - for instance
> I'd like to be able to commit changes right from the browser.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]