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

The only thing that bothers me about the concatenative languages I've seen is the stack. It is a global variable. You don't have the bounding (this is your part of the stack) that you have in languages that have an enforced frame for procedure/method calls.

Sometimes I wonder what a concatenative language would look like if operations could only access things given them by the immediately previous operation and if those things were read-only.



One thing it could look like is Backus's FP. I made a concatenative variant of it back in the 80s, and just rewrote the essentials this afternoon: https://github.com/darius/peglet/blob/master/examples/fp.py

In my earlier dialect I added a form of local variables, just enough for better readability without really changing the semantics.


Row polymorphism has something to say about this, doesn't it? Coming from Haskell, I'm still finding concatenative programming hard to handle.




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

Search: