Welcome to C# 9.0
-
My assessment of the changes: * init, data, with, etc - I don't make heavy use of the immutable types these are intended to support; but they all seem harmless and fit into the category of syntactic sugar that have over the last 15 years made C# so much less verbose than Java. :thumbsup: * Top level programs - I'd like to see a non-trivial example here, assuming this is capable of being used for non-trivial coding anyway (not clear how large its scope is). My immediate thought is skepticism that this should've been brought from REPLs to more general use. :^) * Improved pattern matching - again not a feature I use, but seems harmless to the broader language and should be nice where it is used. :thumbsup: * Improved target typing - having to cast the `null` in code like this `int? result = b ? 0 : null;` in the current language version is something that's always annoyed me. :thumbsup::thumbsup: All in all, it looks like a good update. My only complaint is that it's unlikely my current project will migrate from .net framework to net core in the short to medium term future to take advantage of any of the new features. :sigh: :doh:
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
-
-
My assessment of the changes: * init, data, with, etc - I don't make heavy use of the immutable types these are intended to support; but they all seem harmless and fit into the category of syntactic sugar that have over the last 15 years made C# so much less verbose than Java. :thumbsup: * Top level programs - I'd like to see a non-trivial example here, assuming this is capable of being used for non-trivial coding anyway (not clear how large its scope is). My immediate thought is skepticism that this should've been brought from REPLs to more general use. :^) * Improved pattern matching - again not a feature I use, but seems harmless to the broader language and should be nice where it is used. :thumbsup: * Improved target typing - having to cast the `null` in code like this `int? result = b ? 0 : null;` in the current language version is something that's always annoyed me. :thumbsup::thumbsup: All in all, it looks like a good update. My only complaint is that it's unlikely my current project will migrate from .net framework to net core in the short to medium term future to take advantage of any of the new features. :sigh: :doh:
Did you ever see history portrayed as an old man with a wise brow and pulseless heart, weighing all things in the balance of reason? Is not rather the genius of history like an eternal, imploring maiden, full of fire, with a burning heart and flaming soul, humanly warm and humanly beautiful? --Zachris Topelius Training a telescope on one’s own belly button will only reveal lint. You like that? You go right on staring at it. I prefer looking at galaxies. -- Sarah Hoyt
Dan Neely wrote:
Top level programs - I'd like to see a non-trivial example here, assuming this is capable of being used for non-trivial coding anyway (not clear how large its scope is). My immediate thought is skepticism that this should've been brought from REPLs to more general use. :^)
Even though this is 'only' syntactic sugar, it still strikes me as something quite revolutionary for C#. I am quite surprised. I don't think it would be an overstatement to call it a cultural shift of sorts. Yes, a more complete example would be interesting.