3 ms·
While we're on the topic, PG mentions in one of his essays a few languages with a "reputation for succintness": Forth, Joy, Icon. They are all tiny blips on my
by ced 19y ago
While we're on the topic, PG mentions in one of his essays a few languages with a "reputation for succintness": Forth, Joy, Icon. They are all tiny blips on my radar, popping up once every year in some obscure article. Does anybody have experience with them, and are they worth learning? (Forth is already covered on this page)
- benhoyt 19y agoI learnt to program by writing a Forth compiler in assembler (Dad taught me). It was a superb way to learn. One of Forth's strengths is its ultra-simple syntax. If you thought Lisp had little syntax, think again. Forth is just tokens and whitespace. You can write a compiler than can compile itself in a few screenfuls of Forth (and I'm not talking about eval). Forth is obscure but beautiful. It's reflective, meaning you can write code that writes code (macros). Also like Lisp, you can easily roll your own control structures or add an OOP interface. But it does lack good libraries and a decent-sized user base.
- jaggederest 19y agoI have just started poking with forth, after seeing some network card firmware source written in it. One of the most interesting things, to me, was the built-in disassembler: if you ask 'how is this word defined', and it's not defined in the current environment, it'll go disassemble the binary and show you that. Pretty insane, if you think about having to write software to interface with old / undocumented / closed source libraries.
- benhoyt 19y agoOh yes, and Forth has an elegant solution to Paul Graham's "accumulator generator" problem (though Forth isn't dynamically typed, so it only works for integers): : accgen create , does tuck +! @ ; From comp.lang.forth: http://groups.google.com/group/comp.lang.forth/msg/f06370fed978abff?dmode=source http://groups.google.com/group/comp.lang.forth/msg/f06370fed978abff?dmode=source