Wasn't my point. I think the long form is clearer. One of the great things about Smalltalk is the simple object+message syntax. Brace notation is something else. It can be handy at times, but I think the other form is clearer.
Yes, I agree, the first form is smaller, but to a causal observer, the second form makes more sense. I personally aim for readbility of my code, even by people that do not know the programming language, I would choose the second choice!
On Wed, May 14, 2008 at 5:07 PM, David Mitchell david.mitchell@gmail.com wrote:
But, if you are trying to write code that is portable across Smalltalk dialects, you avoid brace notation.
All dialects have a way to modify the parser don't they (probably a really simple way in many of them)? Maybe an alternative would be to just make a package that adds the syntax to any Smalltalk. Then people could use it if the want and just site the package as a dependancy.
I think modifying the parser is a pretty big expectation for an application or framework.
As I think it would be easier to update. I use literal forms to save myself typing but when I commit code, I'd rather have the long form. In fact, I've sent #sourceString to literal arrays so I could get the long form without all the typing.
That is a good way of doing it, but the maintenance cost comes from how much code is there, not how much was typed. This is a huge problem Java has. Java wizards say "It doesn't matter how verbose the syntax is, I just generate all the boilerplate". But that doesn't help the guy maintaining the code very much.
Wasn't my point. I think the long form is clearer. One of the great things about Smalltalk is the simple object+message syntax. Brace notation is something else. It can be handy at times, but I think the other form is clearer.