> Can you tell me which one so that I ask Janko to fix it?

It is the class instance-variable Singleton in SwazooBenchmarks.

>> 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.

I don't think this will be the only problem we encounter. I reported
this issue, because I am afraid that Pharo makes porting unnecessary
hard and unnecessarily restricts the language.

>> - 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?

This is not part of the Smalltalk syntax. The syntax only says that a
variable is a letter followed by zero or more letters or digits.

>> - it is not possible to assign a new value to a method argument
>
> This was always like that in Smalltalk. Arguments are ready only.

I am just giving examples, this was discussed before.

Since arguments are exactly the same as temps, this is just something
the compiler is enforcing on us. Being able to assign to arguments is
extremely useful and makes code much easier to read. Almost all todays
programming languages (C, C++, C#, Java, Ruby, JavaScript, ...) allow
that.

>> - 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.

What I ment was more the fact that it is not possible to give a
temp-var the same name as an inst-var of the owning class. Or an
inst-var the same name as a global-var. Again, most todays programming
languages allow that. This is an unnecessary restrictions.

>> 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.

Anyway, we don't have to agree on Smalltalk in general ;-)

The only problem I have right now is that Seaside with Swazoo doesn't
load into the latest Pharo, because the compiler disallows uppercase
class instance-variables. It is not an unsolvable problem, but we have
to figure out a nasty hack to make the load-script silently load the
code. And the maintainers of Package Universe and Monticello
Configurations will have to figure out similar patches to work around
the Pharo Class builder.

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

Reply via email to