method vars environment support missing

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

method vars environment support missing

Jochen Riekhof
Being quite a newbie to ST in general, I evaluated VW, X, Squeak and now
Dolphin Smalltalk.
While I begin to like dolphin ST a lot, one fundamental feature present in
all other dialects is when I accept a method definition, the environment
corrects missing or superfluous variable declarations for me.

Why is this convenient feature not present in dolphin Pro? Or can I enable
it somehow?

Ciao

...Jochen

BTW:
Dolphin has a lot of nice extensions that are (in my still limited view)
solved best compared to the other mentioned variants, e.g. protocols,
Packages especially with the cool loose methods feature!

One of the very rare things I found  to be really old fashioned in ST is the
need to declare temporary vars at the method start.
In SmallScript they have the IMO nice feature to make things like
| var |
or even
| var | := <some value>.
possible everywhere in a method body. Unfortunately they spoiled the good
idea with making the same expression valid in a later position of the same
method, thereby disabling error checking for accidentally overwritten local
vars with e.g. copy/pasted code.
In other languages this would mean that
int i = 5;
and later in same method
int i = 6;
are allowed. Very dangerous... Fortunately noone else had this particular
SmallScript idea ;-)


Reply | Threaded
Open this post in threaded view
|

Re: method vars environment support missing

Andy Bower
Jochen,

> Being quite a newbie to ST in general, I evaluated VW, X, Squeak and now
> Dolphin Smalltalk.
> While I begin to like dolphin ST a lot, one fundamental feature present in
> all other dialects is when I accept a method definition, the environment
> corrects missing or superfluous variable declarations for me.
>
> Why is this convenient feature not present in dolphin Pro? Or can I enable
> it somehow?

Take a look at the message posted to this group by Christopher Demers on
13/6/02 entitled:

"ANN: Free Dolphin Tools - Code Completion Lookup..."

Chris has written an add-on to the Dolphin browsers that, amongst other
things, will allow you to choose variable names from pop-up lists. This
should go some way towards addressing the issue that irks you so (although
to describe it as a "fundamental" feature is perhaps going a bit far).

Best Regards,

Andy Bower
Dolphin Support
http://www.object-arts.com
---
Are you trying too hard?
http://www.object-arts.com/Relax.htm
---


Reply | Threaded
Open this post in threaded view
|

Re: method vars environment support missing

Jochen Riekhof
> "ANN: Free Dolphin Tools - Code Completion Lookup..."

Oh, nice, will try this out!


> (although to describe it as a "fundamental" feature is perhaps going a bit
far).

Well, for me as a newbie looking only at Squeak, VW, and some years ago at a
plain ST80 implementation on Atari ST,
and all of them had this behaviour, I considered it fundamental. But on the
other hand, I do not consider it very important, as ST methods tend to be
short, but just convenient to have.

Ciao

...Jochen