[Tfug] Language choices
Robert Hunter
hunter at tfug.org
Wed Nov 8 03:15:12 MST 2006
Hi, Tim.
> > > This is the thing about
> > > x<1 IfTrue: [ do something ]
> > > ifFalse: [do something ]
> > > that I find appealing. You don't have to add "if..else..then..elseif"
> > to
> > > your syntax. The only syntax we have here is:
> > > object message
> > > object message: parameter
> >
> > Personally, I don't find anything innovative about burying conditional
> > execution semantics for the purpose of streamlining the language syntax.
> Not "buried". I don't understand your statement. Maybe I'm not
> communicating very well on either the read- or write-side of the
> connections. Apologies.
Let's suppose that your language doesn't have the "if/else" construct.
In your example, "x<1" automagically instantiates a boolean object
and then you send it a "ifTrue" message, and pass a block of code as an
argument, which presumeably will execute if the boolean state is
true. Now the real question is how "ifTrue" would be implemented.
Since you have no other conditional syntax in your language, you can't
implement it yourself. So the "ifTrue" method would have to be built
into the language. I am not convinced that you have reduced the
syntactic requirements of your language. You have merely substituted
different keywords.
--
Rob
More information about the tfug
mailing list