Spell checking errors can be hilarious

Jacob Carlborg doob at me.com
Tue Oct 13 08:08:27 UTC 2020


On Monday, 12 October 2020 at 19:35:37 UTC, Walter Bright wrote:

> "Yes" and "No" are also poor names, the latter is hopelessly 
> ungreppable.

I agree that `Yes` and `No` are bad names.

> Furthermore, they are just redundant to "true" and "false". 
> They never should have been put in Phobos.

But the problem with `true` and `false` is that it's difficult to 
know the meaning at the call site. That can be solved with a 
custom enum for each function, that allows for better names. Or 
with named arguments (which D doesn't support yet). But unless 
you're using Swift or Objective-C, there's nothing that force you 
do use named arguments on the call site.

--
/Jacob Carlborg


More information about the Digitalmars-d mailing list