On Dec 23, 2008, at 3:41 PM, Lukas Renggli wrote:

> Seaside depends on external packages, that we don't have control over.
>
> For example there the Swazoo package contains a class-instance
> variable that is uppercase.

Can you tell me which one so that I ask Janko to fix it?
> Unfortunately Pharo throws a notification
> (instance variables should begin with a lower case characters) when
> loading that code.

May be we should have a way to trap that exception.

> This is awkward, because it makes it impossible to
> load code automatically and gives us additional work.
>
> In my opinion a programming language should be as open as possible,
> and if possible not restrict the user in any way, even if this is
> against best practices. Unfortunately many of those restrictions are
> built into our language that wouldn't be necessary:
>
> - class names and class-variable names are enforced to be uppercase
> - class instance-variable names are enforced to be lowercase

I really think that this is good.
Else what is the point to have a syntax?

> - it is not possible to assign a new value to a method argument

This was always like that in Smalltalk. Arguments are ready only.

> - variable names are enforced to be unique in all scopes

This is the limit of the current compiler and not having full block  
closure I imagine.

> In my opinion the language should be as open as possible.

No it should follow well specified rules. Else this is the mess.
In Smalltalk uppercase are for global variables and lowercase for  
private.
Class instance variables are only accessible from the metaclass  
methods so they should be
lowercase.
Now if a lousy compiler allows them this is the problem.

> It is the
> purpose of Code Critics to point out smells, not the task of the
> compiler to reject code that doesn't follow best practices.
>
> I am slightly frustrated trying to work around these restrictions ...
>
> Cheers,
> Lukas
>
> -- 
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>


_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to