C# 11: The Highlights | .NET Conf: Focus on MAUI

  Рет қаралды 16,331

dotnet

dotnet

Күн бұрын

Пікірлер: 45
@williambell4591
@williambell4591 2 жыл бұрын
I absolutely love the C# language - I interviewed for my current job of 18-years writing C# 1.0 code back when it was first released, and I haven't looked back since! My favs here are the Required parameters, and the 'triple-quote' strings! PROPS to EVERYONE on the C# language development team - I owe my wonderful career, and livelyhood thanks to all of you!
@volodymyrlytvynchyk271
@volodymyrlytvynchyk271 2 жыл бұрын
Thank you for adding raw string literal to the language. With the indentations feature the perfectionist inside me won't get annoyed when I will work with the strings.
@anm3037
@anm3037 2 жыл бұрын
So excited for the number Interface. I will consume it from the very first day of release
@alexxUKR
@alexxUKR 2 жыл бұрын
Required keyword looks very promising, I guess it will work with record types as well? INumber also looks very nice, as well as static abstract declarations for interfaces. Thanks for great additions there.
@dgkimpton
@dgkimpton 2 жыл бұрын
Features to make a busy dev happy - nice!
@obinnaokafor6252
@obinnaokafor6252 2 жыл бұрын
Nice presentation. We are still waiting for Discriminated Union and Primary Constructor.
@sps014
@sps014 2 жыл бұрын
I am waiting for * Discriminated Unions * Move semantics in Structs * Finalizers in Structs
@petrusion2827
@petrusion2827 2 жыл бұрын
@@sps014 Why do you want struct move semantics? What kind of use case are you hoping for with that feature?
@r1pfake521
@r1pfake521 2 жыл бұрын
Since I started C# a few years ago I always hoped that C# would have some kind of way to tell the generic system about operators to use generic math and that properties have a way to be required without the constructor. It looks like my wish was heard, this looks awesome. A other big wish was to have named tuples, but they where already implemented ;) I have one more "wish" but it's very niche and I don't even know how it could be implemented. But I wish there was a way to somehow alias a property name inside a generic class, so generic methods can use it with the "original'" name and the class itself can use the alternative name, similar like named tuple can be used with Item1, Item2 etc or with the given Element name. The use case for this would be to have a generic base class which has a generic property of type T SomeGenericName like BindingContext and then have the derived class give it an alias for example a MyEditorView could "alias" the "BindingContext" to "EditorViewModel". Then both, "BindingContext" and "EditorViewModel" would refere to the same thing, but using the name "EditorViewModel" would make more sense inside the MyEditorView class instead of just a generic name like "BindingContext" where you have to remember / lookup what "BindingContext" actually is. This is just one example, I have more cases where I wished that something like that was possible. But I don't know how it could be implemented, because it should only be possible for generic classes. It wouldn't make sense for a "Student" to "rename" the Name property. But it also wouldn't make sense to make a MyGenericDerivedEditorView : MyEditorView to rename the already defined als "EditorViewModel" again
@winstonm9764
@winstonm9764 2 жыл бұрын
Looking forward to this. It’ll be fun to try # 11 and write a computer algebra system with it.cC
@codeslashir
@codeslashir 2 жыл бұрын
Awesome as Always
@madsravn4550
@madsravn4550 2 жыл бұрын
Looks cool. Any way of doing additional validation of properties without introducing backing fields? Say, for instance, that names should be non-empty?
@Joe4evr
@Joe4evr 2 жыл бұрын
Yes: One other feature coming up in the next version is "Semi-auto properties" which makes use of 'field' as a contextual keyword inside of a property accessor body to refer to the compiler-generated backing field. EDIT: Correction, apparently this has been pushed to C# 12. Big sad.
@williambell4591
@williambell4591 2 жыл бұрын
As a WPF developer, I would absolutely LOVE this for the members that I need to bind to my user interfaces!
@petrusion2827
@petrusion2827 2 жыл бұрын
@@Joe4evr Big sad indeed, I was looking forward to using the field keyword for implementing INotifyPropertyChanged
@alfusinigo
@alfusinigo 2 жыл бұрын
string literals indent and multiline with """ and required are the highlights, great job!
@jongeduard
@jongeduard 2 жыл бұрын
Oh sure! Very well copied from Java's equivalent (text blocks)! But also done a lot better though! With more features and problems solved with respect to the equivalent from Java (which still needs a lot of extra escaping in several cases). ... And of course we never forget how amazingly well Java copies a lot from C# of course. It's fine though. But just good to know about these things.
@user-mr-m12312
@user-mr-m12312 2 жыл бұрын
@@jongeduard well... how cares about feature-copying?
@anthonysteinerv
@anthonysteinerv 2 жыл бұрын
Now we need BigDecimal, and tbh a way to use other conversion when using string format like binary would be nice.
@nanvlad
@nanvlad 2 жыл бұрын
What if I need to write a string which starts and ends with " sign? Should it be like "" \" some content with "attributes" \" ""?
@明凯-n8v
@明凯-n8v 2 жыл бұрын
start a new line to write " like the end of the video. And there are no other thing after " in the end.
@drgothmania
@drgothmania 2 жыл бұрын
C# is really cool, it's friendly and simple, unlike C++ which is omnipotent but very complex. Having more support for the generic type brings it closer to weakly-typed languages like Python. Raw string literal is also cool stuff to have.
@PapLabros
@PapLabros 2 жыл бұрын
Can someone please explain why they didn't replace the init keyword with the required keyword for the required properties? Thanks!
@warrenbuckley3267
@warrenbuckley3267 2 жыл бұрын
What if I wanted a property that is required to be set during construction but can also be changed to something else after the object has been instantiated? The init keyword only allows me to set the value once (during construction). The required keyword means the property requires a value when the encapsulating object is being constructed but allows the value to be changed to something else after construction. And of course combining both the required and init keywords means I require a value for this property during construction and that value cannot be changed again after construction.
@obinnaokafor6252
@obinnaokafor6252 2 жыл бұрын
@@warrenbuckley3267 But can be copied and modified using "with" keyword.
@warrenbuckley3267
@warrenbuckley3267 2 жыл бұрын
@@obinnaokafor6252 The object it's self is not modified. The 'with' keyword allows the creation of a new object. So, my original answer still stands. The 'with' keyword is just syntactic sugar for creating a new object via its constructor using the original objects state. The original object in this case is unmodified.
@obinnaokafor6252
@obinnaokafor6252 2 жыл бұрын
@@warrenbuckley3267 It is just cloning the object and modifying the property in a Non-destructive way. There is a clone method that is called when 'with' keyword is used.
@FStDrummer
@FStDrummer 2 жыл бұрын
I like the „Everything Beagle“ 😃
@VoroninPavel
@VoroninPavel 2 жыл бұрын
I want required be a feature of CLR instead of just a compile-time check.
@obinnaokafor6252
@obinnaokafor6252 2 жыл бұрын
Why? Is there any limitation if it is a compiled time feature?
@VoroninPavel
@VoroninPavel 2 жыл бұрын
@@obinnaokafor6252 what about F# or dynamically generated code?
@obinnaokafor6252
@obinnaokafor6252 2 жыл бұрын
@@VoroninPavel F# is known for doing a lot of compiler complicated tricks.
@NathanHedglin
@NathanHedglin 2 жыл бұрын
Great thanks !
@pchandu1995
@pchandu1995 2 жыл бұрын
i love this.
@nelsonazolukwamprojects
@nelsonazolukwamprojects 2 жыл бұрын
the triple quote, don't we have that functionality already. with the @ I guess
@pauloperbone
@pauloperbone 2 жыл бұрын
#Javafeelings
@clashclan4739
@clashclan4739 2 жыл бұрын
Multiple quotes as for escaping doesn't looks good
@halivudestevez2
@halivudestevez2 2 жыл бұрын
so chaos is coming....
@coderider3022
@coderider3022 2 жыл бұрын
Looking more like python with every version.
@mubarekabdi
@mubarekabdi 2 жыл бұрын
required properties
What's new in C# 10
29:28
dotnet
Рет қаралды 87 М.
Welcome to .NET MAUI! | .NET Conf: Focus on MAUI
1:01:28
dotnet
Рет қаралды 21 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
When you have a very capricious child 😂😘👍
00:16
Like Asiya
Рет қаралды 18 МЛН
Что-что Мурсдей говорит? 💭 #симбочка #симба #мурсдей
00:19
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 16 МЛН
Where’s C# headed? - Mads Torgersen - NDC Copenhagen 2022
1:01:28
NDC Conferences
Рет қаралды 30 М.
What's New in C# 12 | .NET Conf 2023
35:28
dotnet
Рет қаралды 58 М.
Every single feature added in C# 11
27:07
Nick Chapsas
Рет қаралды 112 М.
Clean Architecture with ASP.NET Core 9
27:01
dotnet
Рет қаралды 39 М.
The .NET MAUI Community Toolkits - Brandon Minnick - CPH DevFest 2024
58:01
What are record types in C# and how they ACTUALLY work
15:36
Nick Chapsas
Рет қаралды 123 М.
Keynote: Advent of Code, Behind the Scenes - Eric Wastl
46:01
Best of CES 2025
14:50
The Verge
Рет қаралды 168 М.
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН