zlacker

[parent] [thread] 1 comments
1. ngruhn+(OP)[view] [source] 2025-12-13 19:42:03
Ah right, I remember now.

> Guards are a bit limited in that they cannot contain function calls,

I feel like that's not a small sacrifice.

> but that's a problem of the BEAM and not something Gleam could control.

Could Gleam desugar to a case expression like I wrote above?

replies(1): >>zelphi+ck1
2. zelphi+ck1[view] [source] 2025-12-14 11:44:12
>>ngruhn+(OP)
Guards also eliminate checking for whether a pattern matching is comprehensive. Or do I remember wrong and the language does not check it at all?
[go to top]