News for hackers. Stuff that matters.
Re:Tail-call optimization added to 6to5 compiler by angersock on Saturday February 07, 2015 @09:27PM (#9016191)
There is a lot of good stuff in there.

I have to ask, though: what the tap-dancing Christ was the purpose of the new Symbol objects? They're completely alien to any other symbols implementation I've seen.

They aren't global by default, they don't compare equally to one another, and even the global ones can't really be used for, say, KV lookups in a global table. WTF?

Re:Tail-call optimization added to 6to5 compiler by mjn on Saturday February 07, 2015 @11:07PM (#9016379)
I believe they're similar to uninterned symbols in Lisp, i.e. what you get in Common Lisp from make-symbol (or gensym). The main intended use-case seems to be to get "private" property names, by conjuring up a fresh name-like thing is not equal to any other name-like thing, and not findable/enumerable in the usual way either. You can then monkey-patch that into a class or do whatever other nefarious thing you were planning.

I agree it's a somewhat confusing name, since interned symbols are the more familiar kind of symbol in other languages, especially in the modern era (older Lisps made more extensive use of uninterned symbols).

Re:Tail-call optimization added to 6to5 compiler by angersock on Sunday February 08, 2015 @01:51AM (#9016622)
So, that sort of makes sense if you were to use them as keys in the new Map and Set objects...but I again, I can't help but notice that I haven't felt their absence yet.

Thanks for the reference about CL make-symbol. Is there a practical use for this we actually would spot in the wild, or do I need to go up on the mountain with a copy of The Art of the Metaobject Protocol?

Re:Tail-call optimization added to 6to5 compiler by fpgeek on Sunday February 08, 2015 @03:03AM (#9016724)
The standard Lisp use for generated symbols is to provide a way to reliably avoid name clashes during macro expansion.

I'm not sure if that qualifies as a practical use in the out in the wild or just a practical way to fix pain (e.g. CPP nonsense) that you can see out in the wild.

Re:Tail-call optimization added to 6to5 compiler by rnbwd on Sunday February 08, 2015 @03:03AM (#9016725)
I had no idea what a Symbol even was until I stumbled upon alt - https://github.com/goatslacker/alt

It's a small and simple code base, and much easier way to grok the concept than reading a book.

Re:Tail-call optimization added to 6to5 compiler by angersock on Sunday February 08, 2015 @01:48PM (#9018069)
Good link. You can see the usage in the first few lines here:

https://github.com/goatslacker/alt/blob/master/src/alt.js

They seem to be being used mostly as immutable constants for readability--which kind of fits with normal use, right? I'm just trying to see if there's anything else here I'm missing.