Hacker News new | comments | show | ask | jobs | submit login

> it's probably possible to encode some of the stack semantics into the type system, making running a program with too few or too many elements left on the stack a type error

Indeed, Factor does this. In addition to checking for stack (over/under)-flows it's what allows really powerful behavior like the ability to say "run both these words with the current stack" without having to explicitly state how much of the stack to duplicate.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact