3 ms·
"Yes, you’re right! It looks remarkably like the “with” control structure available in Delphi/Pascal and VisualBasic!" Those who do not understand Lisp are doo
by mahmud 18y ago
"Yes, you’re right! It looks remarkably like the “with” control structure available in Delphi/Pascal and VisualBasic!"
Those who do not understand Lisp are doomed to reinvent it, poorly. :-)
Fairly good intro article though.
- gruseom 18y agoAs one dedicated Lisper to another, I think you're missing the point here. S-expressions are inherently nested, and the chaining style is about avoiding that (while still being side-effect free). I wrote about this a long time ago on HN... let me see if I can dig up the link. Edit: here's one, though I remember writing something else with examples. Oh well. http://news.ycombinator.com/item?id=304871 http://news.ycombinator.com/item?id=304871
- mahmud 18y agoGood point. One way to do it might be to reify the object instance pointer to a first-class argument (usually the first.) Another way is with a dynamic variable self (might be preferable, since you don't have to break function signatures.) Yet another option might be with a custom method combination, which is overkill :-P Any other ideas? or am I too off the ball park?
- gruseom 18y agoWell, the conclusion I came to was that trying to make Lisp less nested would be like trying to make the North Pole less arctic. If you don't like programming that way, you probably aren't using Lisp in the first place. There are a few exceptions, of course (I like loop quite a bit).