[Cuis-dev] Naming conventions

Juan Vuletich juan at jvuletich.org
Tue Apr 28 07:06:37 PDT 2020


On 4/28/2020 8:20 AM, Luciano Notarfrancesco via Cuis-dev wrote:
> I still like the idea of using a message as
>     PackageName ClassName
> but the dot convention made me imagine a simple implementation. 
> Internally all classes of a package would be prefixed with 
> ‘PackageName.’, and we would have to change the parser to interpret 
> PackageName.ClassName correctly as a global name, and change the 
> method bindingOf: to lookup the association for ‘ClassName’ first as 
> ‘Xxx.ClassName’ for methods compiled in a class belonging to package 
> Xxx. Looks like it might work without changing much, I don’t know how 
> hard it would be to change the tools to display the class names 
> without the prefix when it makes sense.
>

Well, yes. I think that's how the Environments implementation in Squeak 
works. I don't really like it. Reading package code in GitHub, the 
FileList or an external text editor would look different than in the tools.

I think the other solution is nicer. Besides, $. is a statement 
terminator in Smalltalk, PackageName.ClassName would surely break stuff. 
The consequences look hard to bound.

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list