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

I guess because they do not behave in the same way. In fact new Symbol() is closer to Common Lisp's (gensym) than regular :symbol, since everytime you call it you get something unique.

In particular object[:symbol] would behave quite differently (and would be probably worthless since everytime you would access a new property ).

It would make more sense to have :symbol a shortcut for Symbol.for("symbol") instead, but I don't think it would be that much useful.



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

Search: