Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Forth is not adept at dealing with nested lists of anything. It doesn't have linked lists, garbage collection, or traditionally even heap allocation. It does have recursion, but it doesn't traditionally have local variables, and mutual recursion (really handy when you're doing anything related to ASTs) requires using DEFER or something. Do you have a lot of experience writing Forth?


Forth words are nested lists of other words (before compilation). It's not as good at dealing with nested data structures as Lisps, agreed, but the poster above is asking about syntax and DSLs.


Before compilation, Forth words don't exist. During compilation, they are flat lists of other words, not nested lists of other words. After compilation, they can be just about anything. Forth is great for embedded DSLs but it's not because of its great ability to deal with nested lists of words.


As you pointed out, though, programs tend to have nested structures.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: