| ▲ | ashton314 5 hours ago | |||||||
I’ve written a little library Rhombus. I think my favorite thing is the `…` operator. Go check it out. It’s not like the splat operator in other languages, though it does give that feel initially. It’s much more general: it works with nested data structures and can take the place of a `map` operation. The best part of `…` is that it is not a built-in thing—it’s just a macro! The magic is that Rhombus lets you define different macros depending on whether or not the macro identifier appears in binding context (left side of `=`), expression context, or some other contexts. IIRC you can even define your own contexts too. Rhombus takes the best-in-class macro system of Racket and somehow finds a way to improve upon it. I say this after researching and comparing detailed metaprogramming features across a dozen different languages. Rhombus is a very neat little language. Last thing: Rhombus’ main data type, the list, is implemented with an RRB tree. RRB trees support structural sharing, functional updates, and have O(log n) iterate, insert, delete, append, and arbitrary read operations. The constant factor on that is tiny: I think it’s like log_16 or log_32. They’re designed to be very cache friendly. Super cool data structure. | ||||||||
| ▲ | bjoli an hour ago | parent | next [-] | |||||||
Finally someone uses the rrb tree as their main data structure! I implemented it for c# and the performance tradeoff compared to List<> was smaller than i had thought. | ||||||||
| ▲ | WalterGR 4 hours ago | parent | prev [-] | |||||||
> I say this after researching and comparing detailed metaprogramming features across a dozen different languages. I’m very interested in this. What was your research approach? Are there resources you can recommend beyond the documentation for individual languages? | ||||||||
| ||||||||