News for hackers. Stuff that matters.
Re:The .NET Language Strategy by melling on Wednesday February 01, 2017 @05:45PM (#13546166)
You are assuming that the changes would take years. Doesn't it really depend on the changes? Some could be automated? Perhaps a switch/flag could be set within the language itself. If C# became safer, for example, how would you weigh the tradeoffs?
Re:The .NET Language Strategy by ktRolster on Wednesday February 01, 2017 @06:12PM (#13546390)
I can't think of any change in C# that I would make that would really be worth the effort.
Re:The .NET Language Strategy by louthy on Thursday February 02, 2017 @04:00AM (#13549127)
Non-nullable references (by default), as mentioned above. That would be huge, and worth any amount of hit.
Re:The .NET Language Strategy by ktRolster on Friday February 03, 2017 @02:43AM (#13558411)

   > That would be huge, and worth any amount of hit.

I'm open to the idea that non-nullable references (by default) could 'be worth any hit', but I'd like to see the evidence. Have you tested converting a large codebase to non-nullable, and seen a reduction in errors as a result?
Re:The .NET Language Strategy by louthy on Friday February 03, 2017 @10:33AM (#13560442)
I have. Obviously it's not possible to do this completely in C#, but my team has moved over to using Option, Try, and Either types for values that might be null or throw exceptions. We've noticed a reduction in what we all knew was the single most common bug: null reference exception. It also reduces cyclomatic complexity [1], which is a fairly well understood measure of complexity and therefore bugs.

Anecdotally I've noticed a reduction in these kinds of issues when using languages that use non-nullable references by default (F#. Haskell, etc.). I find I am much more confident as a programmer when nullable references aren't the default. Actually a few days ago we had our first null reference error in F#, and it was because the record type passed to an F# function was instantiated in C#.

If you think about it, the idea that a statically typed system lies to you about the contract that a value will honour is always going to be a source of bugs. It takes static languages back into the realm of dynamic languages.

[1] https://en.wikipedia.org/wiki/Cyclomatic_complexity

Re:The .NET Language Strategy by ktRolster on Friday February 03, 2017 @06:35PM (#13564338)
We've noticed a reduction in what we all knew was the single most common bug: null reference exception

Well yes, I'm sure you have, but were those replaced by other bugs, leaving the bug count the same?

Re:The .NET Language Strategy by louthy on Friday February 03, 2017 @06:45PM (#13564412)
No
Re:The .NET Language Strategy by ktRolster on Saturday February 04, 2017 @06:43PM (#13569799)
Good job.