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

Yes, that was the reasoning of what I said. It doesn't really change the way you think about the program, but in PHP it leads to stuff like variable variables (`$$myvarname`) and to assigning a string "foo" to `$x` and having `$x(...)` execute as `foo(...)` and so on... which is cool and useful sometimes, but this really messes up a beginner's mind or it leads to code that is almost impossible for beginners to read, comprehend and learn from.

Perl at least had the "if it's different, it should look different" philosophy as a justification for its sigils. PHP just makes functions and variables look different and it feels like CLs two namespace system with `foo(...)` / `(foo ...)` and `$foo` / `(funcall foo ...)` being different, but it was mostly useless in CL too and it has the same side effect of adding extra cognitive overhead to passing functions around, which imho should be as simple and natural for a beginner as possible to ensure that later on he has a safe landing in functional programming land...




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

Search: