Porting std.typecons to Phobos 3

Elias (0xEAB) desisma at heidel.beer
Thu Dec 26 23:14:44 UTC 2024


On Saturday, 16 November 2024 at 23:17:33 UTC, Paul Backus wrote:
> Personally, `Option` would be my last choice, because the word 
> "option" can also refer to things like command-line flags and 
> configuration values. The Dub package [`darg`][1], for example, 
> has an `Option` UDA that would conflict with this usage.
>
> Between `Optional` and `Maybe`, I'm indifferent.

I’d also have gone with `Optional` instead.

As a nonnative speaker I find `Option` rather confusing. And my 
dictionary couldn’t really help me make sense of it either.

Is this actually an idiomatic usage of that word?
Or is it a homemade abbreviation of “optional”?
Technically, `Option` appears to be more like a two-“Options” 
type – to me at least.

I don’t think saving two characters is worth it.
Text editors with dictionary completion (or better) should be 
able to pick this up in no time – especially if it’s “this is 
going [to be] routinely used”. Given that it will reside in a 
module sharing its name (i.e. it’s identifier is already there in 
the file once it’s been imported), I’d assume this should be a 
no-brainer in practice.


More information about the Digitalmars-d mailing list