News for hackers. Stuff that matters.
Re:The Worst API Ever Made? by pwilson_gorge on Thursday August 07, 2014 @10:41AM (#8147930)
I offer a simple API decision which has condemned generations of programmers to useless toil. The decision in .Net to not map database NULL to programming language null. Perhaps there was some higher level philosophical distinction being drawn which mere mortals are not capable of understanding.
Re:The Worst API Ever Made? by Someone1234 on Thursday August 07, 2014 @12:47PM (#8148699)
> The decision in .Net to not map database NULL to programming language null.

What specific API in the .Net framework does this (or doesn't do this)? Definitely hasn't been my experience but I am using Entity Framework so...

It goes so far as to mark null-able database types as (bool?) (nullable bool) which is super helpful and you can use == null for comparisons.

Re:The Worst API Ever Made? by Hakeashar on Thursday August 07, 2014 @10:17PM (#8151123)
ADO.NET uses DBNull: http://msdn.microsoft.com/en-us/library/system.dbnull(v=vs.1...

There's one valid (if obscure) use case for it, other than that it is pretty much redundant: http://stackoverflow.com/q/4488727/1180426

All modern (micro)ORMs, even if they're just a thin wrapper over ADO.NET like Dapper, work just fine with regular nulls.