| ▲ | ngruhn 12 hours ago | ||||||||||||||||||||||
I can live with these negatives. What irritates me the most is the lack of if/else or guards or some kind of dedicated case-distinction on booleans. Pattern matching is great but for booleans it can be kinda verbose. E.g. | |||||||||||||||||||||||
| ▲ | WJW 11 hours ago | parent | next [-] | ||||||||||||||||||||||
There are (some) guards available though? You could rewrite your example as:
Guards are a bit limited in that they cannot contain function calls, but that's a problem of the BEAM and not something Gleam could control. | |||||||||||||||||||||||
| |||||||||||||||||||||||
| ▲ | lpil 10 hours ago | parent | prev [-] | ||||||||||||||||||||||
In Gleam we would typically write this code with `use`, which doesn’t introduce nesting. | |||||||||||||||||||||||