4 ms·
Only R6RS made () and [] interchangeable. That was hugely controversial, with opponents (myself included) thinking it was a waste of 1/3 of the matching pair sy
by bjoli 5y ago
Only R6RS made () and [] interchangeable. That was hugely controversial, with opponents (myself included) thinking it was a waste of 1/3 of the matching pair symbols.
And the suggested use was not quite the syntax you showed: http://www.r6rs.org/final/html/r6rs-app/r6rs-app-Z-H-5.html http://www.r6rs.org/final/html/r6rs-app/r6rs-app-Z-H-5.html
- patrec 5y agoI fully agree (and thanks for the idiomatic let bracket ordering correction). But the fact that terribly hacks like this are nonetheless adopted shows how much of a pain the paren clutter is and that claims to the contrary are pure cope.
- mpfundstein 5y agoi maintain two large CL code basis. there is no pain because of parens. really not...
- bjoli 5y agoIt is not a terrible hack. It is a useful thing to do if you dont have things like paren highlighting or paredit. I am firmly in the "paren clutter doesn't exist" camp.
- deckard1 5y agoScheme reports lag, though. They usually codify what existing Scheme compiler/interpreters are already doing. I know I've seen plenty of Scheme code in the wild using square brackets interchangeably long before R6RS came out. You can even see the rationale behind this in the Scheme FAQ on Scheme Wiki, which seems to not have been updated since R5RS was current [1] [1] http://community.schemewiki.org/?scheme-faq-language#H-yoyi82 http://community.schemewiki.org/?scheme-faq-language#H-yoyi8...
- Zababa 5y ago> a waste of 1/3 of the matching pair symbols I count 5, (), [], {}, <> and /\ though the last one is a bit of a stretch (but it's reversible: \/). Am I missing something? Did you mean "1/3 of the matching pair symbols left" as () is already used? Or is <> not usable?
- bjoli 5y agoThere are functions starting with < and > so that's no good. And / and \ are already used elsewhere.
- lispm 5y agoThe use of square brackets in Lisp and Scheme is much older. IIRC there were Scheme books which used them much earlier. Interlisp also for example uses square brackets. The left square bracket is equivalent to a round bracket and the right square bracket closes all open levels of brackets.