3 ms·
So a "sharp variable" is just a particular syntax to represent a reference? Is anyone else somewhat unimpressed by this? I mean, sure, it's kind of helpful fo
by amalcon 18y ago
So a "sharp variable" is just a particular syntax to represent a reference? Is anyone else somewhat unimpressed by this? I mean, sure, it's kind of helpful for readability in the printout, and it's kind of nice to be able to one-line a recursive data structure. Just about any reasonably clear syntax will work for the former; there's no reason that the programmer would need to know about it before encountering it.
The latter is mostly useful in a lazy evaluation context; in other situations, you're only rarely creating recursive data structures in the first place (circular linked lists are the most obvious case).
- jcl 18y agoI'm also struggling to see the big benefit. I guess if you are allowed multiple sharp variable references -- as apparently Mozilla's Javascript allows -- you can construct a directed graph in a single statement, including cycles. I don't see that being very useful outside of entering test cases, though.
- herdrick 18y agoGraphs are the new hashtable - this is a great feature. Much of the interesting things being done now are done with giant graph structures. BTW, it's so lame that PLT Scheme is going in the opposite direction. They had the same excellent notation for a long time, but now since they forbid list mutation* they are useless. (* Yes, I know you can explicitly use mutable lists, but they don't work with the huge list library, for example SRFI-1, and there's no literal syntax for them, so it's like using lists in a language that doesn't like lists. Useless.) Actually, I wonder if there's a better syntax for graph literals than this? That would be valuable.