On Jan 14, 2019, at 12:49 PM, fo...@univ-mlv.fr wrote: > > yes, i fully agree, it's just syntactic sugar on top of records and pattern > matching. > That's what's make the proposal great and stupid at the same time. > It's great because it's just syntactic sugar and it's stupid because it's > just syntactic sugar, and like any syntactic sugars it can make the code less > readable because it carries an implicit semantics. > >> >> If, at the end of the game, we decide that the straight denotation of >> pattern matching isn't enough, we can revisit. > > yes !
+1 revisit much later I think this is a kind of target-based type inference. It is as if a tuple-like expression (x, y) were a poly expression, whose type depends on the target type. After inference, a pattern or constructor head is supplied, as T(x, y). That's not completely alien to our bag of tricks. But is is way down the road. We can't even evaluate it until we have the regular T(x, y) form of patterns deployed, so we can gather experience using them *without* the extra type inference. — John