Re: optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-31 Thread Jesse Phillips via Digitalmars-d-announce
On Tuesday, 30 July 2019 at 14:34:19 UTC, aliak wrote: On Tuesday, 30 July 2019 at 12:58:08 UTC, Jesse Phillips wrote: On Monday, 29 July 2019 at 22:17:20 UTC, aliak wrote: * NotNull has been removed Why was it removed. It seems like this would be nice to have for class and pointers. I

Re: optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-31 Thread Andrea Fontana via Digitalmars-d-announce
On Tuesday, 30 July 2019 at 10:04:03 UTC, aliak wrote: On Tuesday, 30 July 2019 at 04:18:28 UTC, Les De Ridder wrote: On Monday, 29 July 2019 at 22:17:20 UTC, aliak wrote: [...] * dispatch() has been renamed to oc(); "optional chain" Why not 'chain()' or 'optionalChain()'? Only because

Re: optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-30 Thread aliak via Digitalmars-d-announce
On Tuesday, 30 July 2019 at 12:58:08 UTC, Jesse Phillips wrote: On Monday, 29 July 2019 at 22:17:20 UTC, aliak wrote: * NotNull has been removed Why was it removed. It seems like this would be nice to have for class and pointers. I personally didn't find use for it, too much friction to

Re: optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-30 Thread Jesse Phillips via Digitalmars-d-announce
On Monday, 29 July 2019 at 22:17:20 UTC, aliak wrote: * NotNull has been removed Why was it removed. It seems like this would be nice to have for class and pointers.

Re: optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-30 Thread aliak via Digitalmars-d-announce
On Tuesday, 30 July 2019 at 04:18:28 UTC, Les De Ridder wrote: On Monday, 29 July 2019 at 22:17:20 UTC, aliak wrote: [...] * dispatch() has been renamed to oc(); "optional chain" Why not 'chain()' or 'optionalChain()'? Only because chain is in range and optionalChain is too long 路‍♂️.

Re: optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-29 Thread Les De Ridder via Digitalmars-d-announce
On Monday, 29 July 2019 at 22:17:20 UTC, aliak wrote: [...] * dispatch() has been renamed to oc(); "optional chain" Why not 'chain()' or 'optionalChain()'?

Re: optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-29 Thread Aliak via Digitalmars-d-announce
On Monday, 29 July 2019 at 22:17:20 UTC, aliak wrote: Hi Link: https://code.dlang.org/packages/optional

optional 1.0.0 beta with "or/frontOr/Throw" range utilities

2019-07-29 Thread aliak via Digitalmars-d-announce
Hi, After some feedback from the community [0], I'm happy to finally get the optional package to a 1.0.0 version. There is one breaking change with how pointer semantics behave, in that the previous version treated some!(int*)(null) as a non-empty optional, and some!Class(null) as an empty