Current sentiment on Nullable.get
H. S. Teoh
hsteoh at quickfur.ath.cx
Tue Dec 11 18:04:37 UTC 2018
On Tue, Dec 11, 2018 at 08:44:03AM +0000, aliak via Digitalmars-d wrote:
> On Monday, 10 December 2018 at 17:07:10 UTC, jmh530 wrote:
> > On Monday, 10 December 2018 at 15:47:53 UTC, aliak wrote:
> > > [...]
> > Does it make sense to deprecate Nullable as a whole, rather than
> > just that piece? Why would I use Nullable when I can use your
> > optional library?
> I would be all for that. I guess the only reason would be to have
> pointer semantics for value types 🤷♂️And I'm not really sure why
> you'd want that anyway.
It's useful for representing a value that isn't there. E.g., if I have
a struct with some int fields parsed from some config file, say, I'd
like to be able to distinguish between a field that's actually set, vs.
one that isn't specified in the config file.
English is useful because it is a mess. Since English is a mess, it maps well onto the problem space, which is also a mess, which we call reality. Similarly, Perl was designed to be a mess, though in the nicest of all possible ways. -- Larry Wall
More information about the Digitalmars-d