|
|
|
|
|
by mlthoughts2018
2905 days ago
|
|
Huh? What does it’s status as an explicit language construct have to do with the situations when it’s useful for design? I’m saying when you program alone, you know when to use discard on your otherwise value-returning function. Other people don’t, and the use of the return type actually suggests the opposite. That you should intentionally invoke that proc for its return value. > “That's against "nice if you are programming alone" as much as it can get.” I don’t understand this claim. Nothing about the formal definition of a language is for or against being “nice if you program alone” — rather it is what patterns of usage does it encourage or facilitate. It’s like “C++ without exceptions”. The formal implementation is just some factoid of the language, but the usage that arises around discard is a bad anti-pattern in terms of communicating intended usage and whether / when to rely on side-effects. |
|