Fear and loathing of the "perlification" of Smalltalk

Jason Johnson jason.johnson.081 at gmail.com
Fri Sep 7 17:55:51 UTC 2007


On 9/7/07, Blake <blake at kingdomrpg.com> wrote:
> On Fri, 07 Sep 2007 02:25:09 -0700, Jason Johnson
> <jason.johnson.081 at gmail.com> wrote:
>
> Well, the cues I forwarded were using words like "abomination" but, yeah,
> given the tone of some threads, it probably wasn't over the top enough.
> It's almost like we're discussing politics here.

:)

> I'm just saying if that the removal of "self" renders your code
> incomprehensible, you have bigger problems than anything that removing
> "self" would create.

It doesn't render it incomprehensible.  I have programmed a lot in C++
and I with implicit "this" always.  But Smalltalk syntax is
wonderfully regular and consistant.  It "feels" right that I can
always know that if a message is being sent the receiver will be to
the left of it.  Even if it's self.

Trust me, when "programming in the large" with the languages that have
the options of implicit self/this you will be expected not to use it.
In fact I think most places would say instance vars need to be
prepended with an "m_" and other nonsense like that.  We don't need
that in Smalltalk because due to the simplicity/regularity of the
language it's never ambiguous when you are accessing an instance
variable.

> That's an argument to have with Andreas.<s>

Heh, I should have used the word "Characteristics". :)

> To me, that would be consistent: Access variables and methods identically,
> without knowing which you're doing unless you're at the level where it has
> to matter.

But you're not accessing methods in either case.  In Smalltalk you're
sending a message somewhere or you are assigning a variable.  In Self
you are basically only ever sending a message.

Self has a better argument for making "self" implicit but at the cost
of syntax.  For example, the requirement on keyword selectors
(describe on the very wikipedia entry you pasted).  But in Smalltalk
message passing and variable access are not at all the same, so they
should look different.



More information about the Squeak-dev mailing list