2 ms·
Pretty much! The language does support limited sugar for tuples without parentheses in some specific cases, such as `match` and `let`: let x, y = 5, 4 in
by zesterer 4y ago
Pretty much!
The language does support limited sugar for tuples without parentheses in some specific cases, such as `match` and `let`:
let x, y = 5, 4 in
...
match x, y in
| 4, 7 => None
\ _, y => Just y
However, these cases only incidentally lower to tuple pattern matching, and deliberately hide the fact that tuples are used internally.
- Akronymus 4y agoAre you planning on having something similar to computation expressions? Altough, I guess thats basically covered within the do notation. https://docs.microsoft.com/en-us/dotnet/fsharp/language-reference/computation-expressions https://docs.microsoft.com/en-us/dotnet/fsharp/language-refe...
- zesterer 4y agoYes! As you say, the do notation + monads covers this, but I'm planning to remove it in favour of a slightly more general 'effect basin' syntax that I'm currently working on (syntactically similar to Rust's async + await, but generalised to all effectful operations like mutation, IO, etc.). Example here: https://github.com/zesterer/tao/blob/master/examples/mutate.tao#L24-L29 https://github.com/zesterer/tao/blob/master/examples/mutate....