Sebastián Mestre

Results 22 comments of Sebastián Mestre

more ideas (sorted roughly by expected difficulty of integrating into our hand-written parser): ```java (fn a, b, c, d); (fn a b c d); (fn a, b, c => d);...

I kinda like the `fn: (a, b, c) d` one

adding `->` solves some problems, but I don't want to be adding new symbols willy nilly. Same thing for the `|a, b, c| d` one: it looks really nice imo,...

> Well you could add the => symbol instead, which already exists. `->` solves problems *because* it's a new symbol. Using `=>` is unhelpful

> I don't think we have much of a choice, there are not many ways to express the types of functions that don't look arbitrarily weird, what are you trying...

Ok, let's go with this for now ```rust fn:(a, b, c) => d; ```

quick idea for implementation: parse into `CST::FunctionTypeLiteral` when converting into AST, convert into a `PolyCall` where the callee is a new `AST` node: `FunctionTypeFunc` ~(alternatively, during desugaring)~ `ct_eval`-ing a `FunctionTypeFunc`...

> Instead of `newvar` it would be cooler to use `forall`. It even has the same amount of letters! Well, that was obviously my first idea. But if you think...

> I don't understand, you mean that even if we declare it as a variable, it could still be unified with some type by inference? Precisely.