I once took advantage of this and aliasing to implement a translation layer. I had a dream of writing Scheme in Esperanto, something like this, which I made up just now based on a 99 bottles solution:
(difini (boteloj n)
(postglui-ĉenon (okazi n
((0) "Ne boteloj")
((1) "Unu botelo")
(alie (postglui-ĉenon (cifero->ĉeno n)
" boteloj")))
" de biero"))
(difini (biero n)
(se (> n 0)
(kun ((bn (boteloj n))
(presi (lambdo (b cmp)
(vidigi (postglui-ĉenon b cmp))
(linifino))))
(presi bn " en la vando")
(presi bn "")
(presi "Prenu unu suben, transdonu ĝin ĉirkaŭ" "")
(presi (boteloj (- n 1)) " en la vando")
(linifino)
(biero (- n 1)))))
(biero 99)
In Forth, even the comment syntax is defined in userspace.
[Comment removed by author]
It’s really not–things commented out by
commentstill evaluate tonil.I once took advantage of this and aliasing to implement a translation layer. I had a dream of writing Scheme in Esperanto, something like this, which I made up just now based on a 99 bottles solution:
My files that did it are long lost to time, but I renewed my interest in translating programming languages when I met and listened to Aditya Mukerjee’s talk on Koro, a Go compiler and toolchain that understands Bengali, at Github Universe last year. I want to extend it for Esperanto some day!