null analysis with control flow
jmh530 via Digitalmars-d
digitalmars-d at puremagic.com
Wed Sep 21 06:46:39 PDT 2016
On Wednesday, 21 September 2016 at 13:10:53 UTC, w0rp wrote:
>
> 1. Most languages (including D) do not support pattern
> matching. If pattern matching was added, it would be totally
> alien to any programmers coming from C, Java, JavaScript,
> Python, etc. This means this method of handling null might not
> be adopted.
I don't see why pattern matching would be alien. It's kind of
like a super-charged switch.
D's algebraic in std.variant could be used to represent a limited
Option type, no?
More information about the Digitalmars-d
mailing list