If you are a young software developer and on the brink of deciding what avenue to pursue in IT, be sure about two guaranteed things – taxes and a constant need for learning, forced by constant changes in programming languages. A lot of people have tried to fight taxes (few even ran from them for a moment) but there’s no single case of a man trying to withhold the development of his technology to have more time. It can’t be done. We are rapidly approaching 2019 and every developer has to ask himself or herself one important question: what’s new and what will I have to learn?
Developed since 1999 by Anders Hejlsberg, emerged as a response for a need of new programming languages at the end of the ‘90s, when development of IT as an industry gained traction and turned into a well-oiled machine that we see today. It’s hard to believe that after 19 years .NET developers will have the 8th iteration of this complete and high object language at their disposal. Similar to previous editions, Microsoft has prepared a lot of new functionalities that should ease our daily work with the code. Among them we can find:
Nullable reference types
Null has taken its toll on misfortunate developers, “I call it my billion-dollar mistake” – says Tony Hoare, inventor of null reference. C# team decides to hop on the “no null allowed” train, sitting next to Kotlin and Typescript, and introduces nullable reference types. Similar to its nullable value types counterpart (denoted by question mark or “Nullable
A default interface implementation
This change perfectly shows that developers like to be inspired by the solutions proven by the competition, for the default implementation inside the interface is something that Java enthusiasts have been using since 2015, alongside with Java 8 launch.
This new and powerful addition enables an extension of already existing classes without the necessity to duplicate the code while adding new interface methods. In the near future, if the developer will like to expand one of many interfaces in the project that is inherited by the countless number of classes, he won’t be forced to implement methods that expand the interface for every linked object. It’s probably one of the most interesting changes that brings C# 8.
New types: Index and Range
Afrer another set of inspirations, this time coming straight from Python, Microsoft decided on bringing two types – Index and Range. Both of them will be helpful when working with indexes in array. Starting from 2019 there won’t be a need of worrying about mistakes in selection and editing various array elements, because in a convenient way, by using Index, user will be able to point to a specific element in array, by order number. It wouldn’t be so shocking if not for the simple addition called the ‘^’ operator which allows for picking elements starting from the end of the array.
The second type, Range, is for choosing a subgroup of elements from the chosen array, using only the indexes numbers.
During the announcement of Index and Range I had one and returning question: why so late? Maybe they do not present a revolution to work with array, but it’s important enough to be happy about and it certainly will make some daily routines easier. Working with a source code when working on an application will be simpler.
Adding a new interface of the collection IAsyncEnumerable
Recursive pattern matching
One of the most interesting changes in C# 8 is an expansion of pattern matching, added in the previous version of the language. Starting from 2019 there will be a possibility for nesting another pattern matching in your content; it will be called a recursive pattern matching. It shouldn’t be a surprise for anyone, using this popular feature allows for the clarity of the code. With its tight rules of engagement the pattern matching itself proved to be very useful. It allows for skipping a never ending list of ‘if and that works for the code quality. Adding more functionality to the pattern will further advance C# as a language.
.NET Core 3.0
In the near future .NET Core will totally replace .NET Standard. It seems that announced in May 2018, a new version should help in the development of desktop applications within the Windows environment and allow for easy translation of already existing applications from .NET Standard to .NET Core. New information about this framework should be available at the beginning of 2019.
The second announced change in .NET Core 3.0 is a brand new approach to managing and development of project files in solution. Currently there are no further information on the topic, we have to wait beyond Valentine’s Day.
.NET Framework 4.8
Announced with .NET Core 3.0 a new and supposedly better version of .NET Framework didn’t receive that much of improvement, at least for now. The main differences should lie in perfecting Windows Forms Accessibility, adding SelectionTextBrush, better performance of ZLib and better overall performance of the entire framework itself. Microsoft also announced that they weren’t able to add all projected features and eliminate all remaining bugs. They should however be added and removed in the near feature.
After a solid research about upcoming changes to C# and .NET I can say that the next year won’t present itself as a period full of sleepless nights and oceans of coffee. Microsoft is betting on evolution not revolution. With features and changes developed for desktop, web and mobile applications, Microsoft wants to not only add fuel to already existing solutions but also to create them. Without a special spark, though.
< Previous article