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

Your problem is knowing how most C implementations work and trying to extrapolate that knowledge to other languages.

In C, a variable's lifetime is limited to the current function call. The natural implementation of C is to track both function calls and variables on stack structure with statically determined offsets. Thus, C has stack-allocated variables.

Since a Clojure variable's lifetime is not limited to the current function call, C's implementation details aren't relevant. Stack-allocated variables are a bizarre notion.

For some reason (as I didn't mention Clojure which I know nothing about) you are making the incorrect assumption that my confusion with certain features comes from trying to apply how another language works to a different language.

In reality it comes from trying to apply how that language works in normal cases (in the absence of those features), and the features requiring special compiler magic to work.

Yes if variable lifetime is as you describe in Clojure then that sentence doesn't make sense for Clojure.

As I've already told someone else, it is unlikely that learning C at some point in your life (not as my first language, not as the language I use professionaly, not even in my top 3 most used languages) permanently cripples your ability to understand other languages.

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