3 ms·
I was surprised to learn that this has got to be one of the only languages which is easier to compile than interpret. When compiled the language reduces to basi
by ajyoon 10y ago
I was surprised to learn that this has got to be one of the only languages which is easier to compile than interpret. When compiled the language reduces to basically a single-register assembly with a one-to-one character-to-line ratio. Bracket branching can be extremely easily implemented with jump labels and `test` + `jnz` statements without having to worry about things like parsing and jump table construction at all.
- QuercusMax 10y agoIt's pretty freaking easy to interpret, as well... I implemented an interpreter in Go (which I had never used before) in an hour or so; most of the time spent was learning the two languages (Go and BF). I should start asking interview candidates to write a BF interpreter...