Click here to Skip to main content
15,897,371 members

The Insider News

   

The Insider News is for breaking IT and Software development news. Post your news, your alerts and your inside scoops. This is an IT news-only forum - all off-topic, non-news posts will be removed. If you wish to ask a programming question please post it here.

Get The Daily Insider direct to your mailbox every day. Subscribe now!

 
GeneralRe: 'Execudus' in Redmond: Top Microsoft execs get out Pin
Dan Neely11-Dec-13 2:58
Dan Neely11-Dec-13 2:58 
GeneralRe: 'Execudus' in Redmond: Top Microsoft execs get out Pin
Kent Sharkey11-Dec-13 5:43
staffKent Sharkey11-Dec-13 5:43 
NewsSamsung's Big Developer Push For Galaxy-Specific Multiscreen Apps Pin
Christopher Shields10-Dec-13 9:30
Christopher Shields10-Dec-13 9:30 
Newsnull Considered Harmful Pin
Kent Sharkey10-Dec-13 9:19
staffKent Sharkey10-Dec-13 9:19 
GeneralRe: null Considered Harmful Pin
PIEBALDconsult10-Dec-13 14:04
mvePIEBALDconsult10-Dec-13 14:04 
GeneralRe: null Considered Harmful Pin
Rob Grainger10-Dec-13 22:48
Rob Grainger10-Dec-13 22:48 
GeneralRe: null Considered Harmful Pin
_Maxxx_11-Dec-13 18:37
professional_Maxxx_11-Dec-13 18:37 
GeneralRe: null Considered Harmful Pin
Rob Grainger13-Dec-13 22:56
Rob Grainger13-Dec-13 22:56 
I wasn't sure how Obj-C handled null - but on checking it looks like you have the potential for both null pointer exceptions (when a null pointer is used in C code) and nil reference issues (when a message is sent to a nil object). The latter can at least be handled (I'm not sure how useful the "silently ignore messages sent to nil" option is).
Effectively though, the situation remains that the programmer must remember to check for null/nil everywhere and handle appropriately - which evidently does not happen as often as it should (always).

In Smalltalk, each object can implement a doesNotUnderstand: message, but there is still a nil object (effectively a null) that doesNotUnderstand: any messages. The doesNotUnderstand: message can be replaced on Object itself, which will catch all such messages (unless overridden in a subclass). All of these options seem non-optimal, and really just mask the underlying problem.

At least C++ has reference types that cannot be initialised to null (well they can, but only by such stupidity as:

C++
int& i = *((int*)nullptr);


So its progress, but not much.

If an error object is used, it can be written to respond to all messages by returning self (this) - consequently such errors cannot be masked. Once an error occurs in an expression, the result of the expression is guaranteed to remain an error object. This is some improvement - a bit more like NULL in databases. (Although many databases also fail to implement NULL properly, for example allowing it to be treated as an empty string when used in string concatenation).

Here's looking forward to a day when lessons that should have been learned 30 years ago are finally learned.

On a similar note on lack of progress in systems, here's a polemic from Rob Pike on Systems Software Research[^] (itself written in 2000, showing just how glacial progress is).
"If you don't fail at least 90 percent of the time, you're not aiming high enough."
Alan Kay.

GeneralRe: null Considered Harmful Pin
Rob Grainger10-Dec-13 22:45
Rob Grainger10-Dec-13 22:45 
GeneralRe: null Considered Harmful Pin
Rob Grainger10-Dec-13 22:47
Rob Grainger10-Dec-13 22:47 
GeneralRe: null Considered Harmful Pin
Brisingr Aerowing11-Dec-13 3:32
professionalBrisingr Aerowing11-Dec-13 3:32 
NewsThe worst IT project disasters of 2013 Pin
Kent Sharkey10-Dec-13 9:05
staffKent Sharkey10-Dec-13 9:05 
GeneralRe: The worst IT project disasters of 2013 Pin
MacSpudster10-Dec-13 10:28
professionalMacSpudster10-Dec-13 10:28 
GeneralRe: The worst IT project disasters of 2013 Pin
gstolarov10-Dec-13 11:29
gstolarov10-Dec-13 11:29 
GeneralRe: The worst IT project disasters of 2013 Pin
Eddy Vluggen10-Dec-13 22:27
professionalEddy Vluggen10-Dec-13 22:27 
GeneralRe: The worst IT project disasters of 2013 Pin
MacSpudster13-Dec-13 6:13
professionalMacSpudster13-Dec-13 6:13 
NewsElusive dark matter may have already been found Pin
Kent Sharkey10-Dec-13 9:00
staffKent Sharkey10-Dec-13 9:00 
GeneralRe: Elusive dark matter may have already been found Pin
Dan Neely10-Dec-13 9:06
Dan Neely10-Dec-13 9:06 
GeneralRe: Elusive dark matter may have already been found Pin
TheGreatAndPowerfulOz10-Dec-13 10:22
TheGreatAndPowerfulOz10-Dec-13 10:22 
GeneralRe: Elusive dark matter may have already been found Pin
PIEBALDconsult10-Dec-13 14:36
mvePIEBALDconsult10-Dec-13 14:36 
NewsInsane prediction of the year: Microsoft will merge with Apple Pin
Kent Sharkey10-Dec-13 8:55
staffKent Sharkey10-Dec-13 8:55 
GeneralRe: Insane prediction of the year: Microsoft will merge with Apple Pin
Dan Neely10-Dec-13 9:09
Dan Neely10-Dec-13 9:09 
GeneralRe: Insane prediction of the year: Microsoft will merge with Apple Pin
Christopher Shields10-Dec-13 10:05
Christopher Shields10-Dec-13 10:05 
GeneralRe: Insane prediction of the year: Microsoft will merge with Apple Pin
PIEBALDconsult10-Dec-13 14:07
mvePIEBALDconsult10-Dec-13 14:07 
NewsWhy you should use continuous integration and continuous deployment Pin
Kent Sharkey9-Dec-13 12:16
staffKent Sharkey9-Dec-13 12:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.