null == "" is true?

Kagamin spam at here.lot
Mon Jul 18 17:20:04 UTC 2022


On Tuesday, 12 July 2022 at 20:36:03 UTC, Antonio wrote:
> Honestly, it is difficult to understand for newcomers... there 
> is a reason, but there is a reason in javascript for `0 == ''` 
> too

People would have different preferences there. Difference between 
null and empty is useless. D does the right thing here, what 
other languages do, is a mistake. If you want such difference, 
use the Nullable wrapper or Algebraic.


More information about the Digitalmars-d-learn mailing list