top | item 47103530

(no title)

phpnode | 8 days ago

The pattern matching example has a type Shape which is never referenced and this seems to conflict with the idea that you never write a type, am I missing something obvious?

discuss

order

KPGv2|8 days ago

I think they mean you never write types for your variables or functions. They don't mean you can't create types. That's the reference to Hindley–Milner type system and type inference. You don't have to say

x : Nat x = 5

You just say x = 5

I personally don't like that you don't seem to be able to manually describe the type for a fn/var, because it's very useful when prototyping to write stubs where you provide the typedef but then the actual variable/function is just marked as "todo"

jibal|5 days ago

Use [sig ...] to specify function types.