3 ms·
Yeah, I cottoned to that eventually - it's short(er)-hand for Perl 5's qw() construct. I guess Set is a method (coercer!) of...lists? List-shaped things? Sets s
by throwanem 10y ago
Yeah, I cottoned to that eventually - it's short(er)-hand for Perl 5's qw() construct. I guess Set is a method (coercer!) of...lists? List-shaped things? Sets seem list-shaped, although indexing doesn't work by any syntax I could find, and certainly not by any that an @ sigil should suggest. Can I call Set on a set? Does it do something weird if I do? And if I'm going to deal with this kind of high weirdness, why not just bite the bullet and go with Haskell or even Urbit? This just feels like it's trying to out-Ruby Ruby, and Ruby is Ruby enough already.
The OP had some snark to offer on the subject of "Texas" operators, and the documentation lists them by their Unicode glyphs. That they work I get. But I think it's reasonable to gather a sense of second-class citizenship from their presentation.
- kbp 10y agoWhat "high weirdness"? Sets in most languages that have them do not support indexing, because they're usually understood to be unordered. Aside from that, there is a method to convert a list to a set. What are you confused about?
- hsitz 10y agoYes, in mathematics sets are by definition unordered, so it would be strange to have a language that supported indexing of a set.
- deleted 10y ago[deleted]
- ab5tract 10y agoIt's fun to answer questions that could be easily answered with a single invocation, but here goes: coercing a set ($set.Set) is a no-op. my $set-of-sets = set $set; The above will create a new set with $set as its only member.