digitalmars.dip.ideas - UCFS for compile-time sequences
- Andrey Zherikov (19/19) Apr 15 After quick discussion with Walter last weekend, I'd like to
After quick discussion with Walter last weekend, I'd like to propose the following adition to D syntax. **Problem** We do have UCFS for run-time sequences: `some_array.filter!my_filter.map!my_transform`. However we don't have such capability for compile-time sequences and one has to write the similar thing using old style `StaticMap!(my_transform, Filter!(my_filter, sequence))` or "temp variables". **Suggestion** Add new operator `.!` (just an idea - please suggest more appropriate name) so `A.!B!C` expression becomes `B!(C,A)`. Applying it to the example above: ```d StaticMap!(my_transform, Filter!(my_filter, sequence)) // can be replaced with: sequence.!Filter!my_filter.!StaticMap!my_transform ``` PS I didn't think a lot about this - just wanted to share the idea.
Apr 15








Andrey Zherikov <andrey.zherikov gmail.com>