News for hackers. Stuff that matters.
Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by elchief on Sunday May 29, 2016 @10:51PM (#11799297)
You're gonna need nulls until databases stop supporting nulls. And everyone would need to use 6th normal form for that to happen, and nobody wants that
Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by danielnixon on Sunday May 29, 2016 @11:03PM (#11799330)
Not true. Nullable values in a database can be dealt with (and I would argue _should_ be dealt with) using a maybe/option[1] type. This is exactly what Slick[2] does, for example.

[1] https://en.wikipedia.org/wiki/Option_type [2] http://slick.lightbend.com/

Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by bubaflub on Sunday May 29, 2016 @11:57PM (#11799468)
Could you explain why you believe the presence of a NULL in the database necessitates a NULL pointer somewhere in the code?
Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by andrewguenther on Monday May 30, 2016 @12:00AM (#11799476)
I believe the author's intent is if you read a null value out of a database, how would you represent it in code?
Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by bubaflub on Monday May 30, 2016 @12:20AM (#11799533)
I think it depends on where the NULL is and what it represents.

If NULL value is in a field that is used for JOIN-ing, I don't think you would "represent" the NULL value as much as you would simply have a lack of data. For example, if you had some set of results from a query that contained a JOIN on a field and some values were NULL, those records with the NULL value would not be in the result set.

If we do receive results with possibly NULL values I believe they could be either be represented with an appropriate zero value -- e.g. "" or 0 -- or with an optional type like another commenter suggested.

Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by bbcbasic on Monday May 30, 2016 @01:24AM (#11799710)
.NET uses DBNull.Value, which is not null.

Also 6th normal form?? What is that?

Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by icebraining on Monday May 30, 2016 @04:42AM (#11800303)
Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by achr2 on Monday May 30, 2016 @07:52AM (#11800839)
I work with an engineering application that uses a 5th/6th normal form database that is implemented in standard SQL server/Oracle DBs. It is awful and painful. A simple query with maybe five properties and 2 relationships takes upwards of 20 joins. Yet the database only has 4 tables...
Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by lgas on Monday May 30, 2016 @01:34AM (#11799739)
You store each letter in the names of the columns of your tables in a different data center.
Re:Null References: The Billion Dollar Mistake – Tony Hoare ... by IncRnd on Monday May 30, 2016 @12:59AM (#11799639)
Null references to memory are what is being discussed, which is completely different from variant/option types. Changing databases has nothing to do with NULL references to memory.