[F-Script-talk] Syntax suggestion
Brought to you by:
pmougin
From: stephen w. <st...@ad...> - 2006-09-14 09:24:14
|
Hi Philippe and others, Yes, the language writer's horror rears its ugly head... it's syntax suggestion time! :) Many times, I'll be burrowing through some object references on the command line, and I find myself having to enclose everything I've typed in ()'s. By the time I get to what I'm after, Smalltalk is looking very much like LISP! So, just as sentences have commas as well as full-stops, perhaps Smalltalk needs a comma! Here is how it could operate: Current: object4 setMapX:((object7 valueForKey:'trackpoints') at:432) latitude. Proposed: object4 setMapX:object7 valueForKey:'trackpoints', at:432, latitude. Multiple arguments: object4 addDepth:object4 depth width:(adjust valueForKey:'width') height:object4 height. object4 addDepth:object4 depth width:adjust valueForKey:'width', height:object4 height. The lexical opposite of cascading? The comma would be matched to the start of the current section, like cascading, but update with results instead of retaining the first object. I can't seem to find any ambiguous cases, except when defining arrays in { ,, }. Whether it is a comma or some other syntax, there does appear to be some opportunity for replacing the nested ()'s with something more readable. Steve. -- st...@ad... |