Free syntax idea: implement the common notation of an overline meaning "repeated some number of times" by writing underscores in the line above
Conversation
Have you seen Racket and Coq's ... instead? I find the actual syntax rules more mysterious than Scala's underscore, but it's basically magic! (And a syntax for folds, really).
3
3
I haven't. (Is that what C++'s variadics were inspired by?)
1
I dunno, I’m guessing it would be more likely to just be the maths notation, but I dunno. From what I’ve seen the C++ folks are pretty bad at citing their sources :/
1
Oh I thought you meant fold expressions actually open-std.org/jtc1/sc22/wg21
3
C++'s ... is just Java's, I think?
Instead, Racket's ... and Coq .. is a DSL for fold macros! It lets you write this (from Coq):
Notation "[ x ; y ; .. ; z ]" := (cons x (cons y .. (cons z nil) ..)).
(from coq.inria.fr/library/Coq.Li).
2
1
Not really... C++11 ... C++ 17 added a bunch of stuff on top.


