Hacker News new | ask | show | jobs
by batou 3968 days ago
We do no LINQ near the database so some of those assumptions aren't valid here. We use NH criteria for that.

The coalesce operator in C# 5 is welcome but then introduces another problem:

    var x = myObject?.Property1?.Property2?.Property3;
If x is null, why and where?

This is all in-memory manipulation of data. Mainly rules engine stuff for us.

1 comments

But both you and I know that is bad design. The operator is a shortcut for simple scenarios, but in this case if a decision has to be made then you should be handling the null checks yourself and making those decisions explicitly.

A line like that is just lazy. I'm more keen to blame the developer and not the language. Striking nails with your fists as they say.