←back to thread

620 points tambourine_man | 1 comments | | HN request time: 0s | source
Show context
runekaagaard ◴[] No.43749575[source]
It feels a bit like "cheating" that new x-string features are built-in only. It would be cool to be able to do:

    from foo import bar
    bar"zoop"
replies(7): >>43749594 #>>43749601 #>>43749709 #>>43750748 #>>43751130 #>>43752217 #>>43757083 #
1. zahlman ◴[] No.43757083[source]
In my own language design (nothing public yet - need to prioritize more practical things at the moment) this is definitely on the menu. Aside from a minimal set, keywords are implemented as compile-time macros; and it's intended that they can be extended, both "natively" and in the implementation language, by writing AST-manipulation code. But the handling of arithmetic expressions, as well as the broader line/block structure, is hard-coded. (I draw inspiration from both Python and the Lisp family.)