why?
Because an empty string is, by default, represented by an empty
slice of the null pointer.
I don't program in D. I just read from time to time posts in the
D forum because of the good quality of what people write. So, I'm
not proficient in D, but in general internals should not boil up
to the surface.
In my experience null and empty in DTOs usually play the same
logical role.
Oh, oh ...
IIRC someone wrote a master thesis about the different roles for
null values in databases >and came up with many different null
situations (was it five?).
Oh, oh, oh ...
I once worked on a system where some little robot running on a
track picked up material in carriers from some machine and then
brought it to the next machine. If the destination of a carrier
was set to null, it implied that the destination was currently
undefined. Then the robot brought the carrier to some rack where
it was put aside for a while till the planning system had created
a new production plan. The number of null pointer exceptions we
had to fix because auf this was countless. Never make null imply
some meaning ...
- Re: null == "" is t... user1234 via Digitalmars-d-learn
- Re: null == "" is t... Bienlein via Digitalmars-d-learn
-