2007/8/27, Alan Lovejoy squeak-dev.sourcery@forum-mail.net:
Denis Kudriashov wrote:
Smalltalk is wonderfull language. We can implement any ideas without making changes in language (as Java or C# live). I think pipes is very usefull in DSL implementation and usage, simpler and fast object inspecting. But long message chaines in domain code are bad smell
There haven't been all that many syntax changes to Smalltalk since its public release as ST80. Off the top of my head, I can list the following:
These changes does not have an influence on language core, language semantics. Its just was some convenient constructions for building special objects. But when we put in Smalltalk new operator we change it semantics. Why we must do it? Bert implemented it in clean Smalltalk without any language changes. Why it is not enough?
Best regards, Denis
On Aug 28, 2007, at 10:50 AM, Denis Kudriashov wrote:
2007/8/27, Alan Lovejoy squeak-dev.sourcery@forum-mail.net: Denis Kudriashov wrote:
Smalltalk is wonderfull language. We can implement any ideas without making changes in language (as Java or C# live). I think pipes is very usefull in DSL implementation and usage,
simpler
and fast object inspecting. But long message chaines in domain code are bad smell
There haven't been all that many syntax changes to Smalltalk since its public release as ST80. Off the top of my head, I can list the following:
These changes does not have an influence on language core, language semantics. Its just was some convenient constructions for building special objects. But when we put in Smalltalk new operator we change it semantics. Why we must do it? Bert implemented it in clean Smalltalk without any language changes. Why it is not enough?
Best regards, Denis
Well said.
My view is that adding the pipe you asserting that chained functional applications are good and should be used more. Is this what you want ?
The good tricks we have seen are not enough for me because I don't like the cascade to change it's meaning while reading.
on the pipe (which I look at as beautiful hack)
I't like making the question mark become an exclamation mark because there was a special keyword (asPipe). "!" and "?" are both terminators and I don't like their meaning to be switched while reading.
Then I think that chained applications of functions is good way to reuse methods.
Fabio Filasieno
Denis Kudriashov wrote:
2007/8/27, Alan Lovejoy <squeak-dev.sourcery@forum-mail.net mailto:squeak-dev.sourcery@forum-mail.net>:
There haven't been all that many syntax changes to Smalltalk since its public release as ST80. Off the top of my head, I can list the following:
These changes does not have an influence on language core, language semantics. Its just was some convenient constructions for building special objects. But when we put in Smalltalk new operator we change it semantics. Why we must do it? Bert implemented it in clean Smalltalk without any language changes. Why it is not enough?
There are two issues:
1) Are the proposed "pipes" a good idea at all? Is it good programming style--or an abusive practice?
2) If pipes are good style, is it better to implement them syntactically (which is rarely done in Smalltalk,) or using Smalltalk's usual implementation strategy: sending messages to objects?
There are two arguments in favor of the syntax-based implementation (which presumes that the answer to point 1 above is that "pipes are good style"):
1) Performance: The syntax-based implementation would be significantly faster.
2) Code clarity: The syntax-based implementation could be made visually much clearer, with much less probability of being wrongly interpreted by the reader. A reader of the code would be much more likely to miss an #asPipe message at the beginning of a sequence of message cascades, than he would be to miss a new, well-chosen pipe operator (e.g, ":>"). The semantics of a message cascade and a sequence of piped messages is rather different.
Personally, I'm undecided as to whether pipes are good style, but favor a syntax-based implementation, if pipes are to be implemented and used at all (for the reasons above.)
--Alan
squeak-dev@lists.squeakfoundation.org