3 ms·
Maybe what Lisp needs to make it popular with kids these days is a hip new syntax. Instead of nested in-and-out bubbles like (foo (bar)), it could have nested
by DonHopkins 7y ago
Maybe what Lisp needs to make it popular with kids these days is a hip new syntax.
Instead of nested in-and-out bubbles like (foo (bar)), it could have nested up-and-down ramps like \foo \bar// or /foo /bar\\, to represent a "change of level".
That way you could have positive and negative nesting, and turn programs inside-out!
Y-Combinator:
\defun Y \f/
\\lambda \g/ \funcall g g//
\lambda \g/
\funcall f \lambda \&rest a/
\apply \funcall g g/ a//////
Y-Uncombinator:
/defun Y /f\
//lambda /g\ /funcall g g\\
/lambda /g\
/funcall f /lambda /&rest a\
/apply /funcall g g\ a\\\\\\
- gchamonlive 7y agoAren't you just exchanging the pair (,) for /,\ or \,/? What real benefits that implies apart for aesthetics?
- DonHopkins 7y agoPurely aesthetics! ;) I wouldn't want to mess up a good thing. You would just have a positive and a negative way of writing the same thing. You could turn the paren bubbles inside-out like )foo )bar(( but that doesn't look as cool to me as flipping the ramps upside-down like /foo /bar\\ and \foo \bar//.
- TeMPOraL 7y agoIt would give the kids something to keep bikeshedding about, and spawn 20 different code style standards and associated autoformatters. All of that pointless, but hopefully, such injection of energy into the ecosystem would help Lisp get more popular.
- jancsika 7y ago> "change of level" The obvious interface for such a concept would be to have matching parentheses "snap" into a kind of token field around the corresponding text. It would be pretty easy to then build a kind of raised relief map of code built from nested token fields that suggest elevation changes instead of nested parentheses. All in realtime as the user types, of course. In the history of Lisps is there such an interface? My gut tells me either a) no, or b) yes, there's a maximally unusable version which was abandoned immediately upon recognition that it would suffice as bait to inculcate newcomers into the cult of Lisp parentheses. Edit: clarification
- rscho 7y agoracket rhombus will attempt that. https://github.com/racket/rhombus-brainstorming https://github.com/racket/rhombus-brainstorming
- pepper_sauce 7y agoThat's a great suggestion. I'll start the wiki!