3 ms·
Not just prettier, but it is more correct to shadow if your intent is to make the original x unavailable. It would be cleaner/safer if the language had a keywo
by judk 13y ago
Not just prettier, but it is more correct to shadow if your intent is to make the original x unavailable.
It would be cleaner/safer if the language had a keyword like 'shadowlet'.
- velis_vel 13y agoI've also done stuff like x <- m1; f x; x <- m 2; f x; in a do-block, and it's not clear to me how to write 'shadowfrom' (or however you pronounce '<-' in that context).
- judk 13y agoMaybe this would be cool: x! <- m 2 Sort of like a strictness annotation. In think it would be a compatible language change, since only identifiers can currently appear left of a <-