I'm glad that they finally added pattern matching to dart. I've been using it everywhere since it came through in dart 3.0. probably my favorite version of pattern matching is the elixir/Erlang module level pattern matching where are you can specify multiple functions with the same name in a module. So for example if I have a function that has optional arguments, I can create a function head that takes zero parameters and I create one for the optional parameters. The runtime will pattern match on the function head that is being invoked based on the amount of parameters that are being passed in. You can take this even further too, where you explicitly match on a value or on a type etc. It's unfortunate that we don't have this in dart but the dart version of pattern matching is still extremely powerful. My favorite use case in dart specifically is probably the first one you showed, where you can bind to a new variable if the sub case matches, it is basically rust's if let binding. It's kind of a shame that the enhanced enums are all constant, if they were more like union types, we could do a ton of different monads with pattern matching. For now you can do a similar thing with inheritance but it's not as powerful.
I am interested in taking your course, but there is no information when it was last updated. Can you tell me what version of Flutter and Riverpod you use in the course?
I actually stopped using vscode more than 2 years ago now. Just used VSCode for the videos because it would feel more comfortable for the viewer. Then I stopped caring :D No but it's NeoVim and it's the best and all others suck
WOOOOO!! pattern matching for the winn
good to hear. it's a nice language feature for dart/flutter
We need more of this, great content!
Thanks, appreciate it! Any recommendations of what you would like to see?
@@RobertBrunhage Tips and use cases for new/existing language features. It saves a lot of time not having to read the documentation
I like how you casually explained type promotion at 1:42
First, is the background made in blender? If yes, thats pretty damn cool, second, we need more content from you :)
I'm glad that they finally added pattern matching to dart. I've been using it everywhere since it came through in dart 3.0. probably my favorite version of pattern matching is the elixir/Erlang module level pattern matching where are you can specify multiple functions with the same name in a module. So for example if I have a function that has optional arguments, I can create a function head that takes zero parameters and I create one for the optional parameters. The runtime will pattern match on the function head that is being invoked based on the amount of parameters that are being passed in. You can take this even further too, where you explicitly match on a value or on a type etc. It's unfortunate that we don't have this in dart but the dart version of pattern matching is still extremely powerful.
My favorite use case in dart specifically is probably the first one you showed, where you can bind to a new variable if the sub case matches, it is basically rust's if let binding. It's kind of a shame that the enhanced enums are all constant, if they were more like union types, we could do a ton of different monads with pattern matching. For now you can do a similar thing with inheritance but it's not as powerful.
Also in C++ "Function Overloading".
I really like the new features for Dart 3.0, but I fear that readability will suffer in many projects 😅
Thanks a lot, great video
Nice. This is something I miss in every language since trying one that has it
THANKS
finally a creator that makes something new and good.🙂
I didn't know about the fact you could add 2 variables into the switch statement :O
Good explanation 🙂
Tyty!
This is going to be awesome with Flutter for making it easier to model logic for dynamically picking which widget to show
I wish you were still making videos!
Gr8 this is dart shorts helps to impoverished dart
se puede usar el inspector de widgets en neovim? yo no he podido usar neovim para flutter por esa razon.
Hello Sir! One thing that is flying in my mind for over two years is how did you become such a great programmer? Your answer means a lot to me!
You'll have to "shake" back later.
I am interested in taking your course, but there is no information when it was last updated. Can you tell me what version of Flutter and Riverpod you use in the course?
Thank you for ur video !. You have a nice IntelliSense system in ur editor . Which editor do you have and which intelligences system ? thank you.
bloc + pattern matching. makes life easier
hi, can you teach how to setup vim with flutter env?
which editor is this?
NeoVim :) The best editor that has ever existed
rip legend
Is he dead?
I‘m just here for the „3“ ❤
Hey Robert still you think Flutter had good future, bcz there are very less project exist for flutter.
Your suggestion.
You must be from Sweden, I can hear it!
SwEDen sWeDEN SWEDEN!!!
@@RobertBrunhage Göteborgare?
Yeyeyeyeye
@@RobertBrunhage Näe lägg av
What IDE is that...
And why is everyone hating on vs code, did I miss something 😅
It's neovim and we hate vs code cuz
1. It's a Microsoft product
2. Consumes a lot of memory
3. Super slow
I actually stopped using vscode more than 2 years ago now. Just used VSCode for the videos because it would feel more comfortable for the viewer. Then I stopped caring :D
No but it's NeoVim and it's the best and all others suck
@@RobertBrunhage is that autocomplete from copilot or is it just inbuilt?
@@sirk3v The one where I have normal autocomplete from options are inbuilt LSP (same as other editors)
The ghost text that I tab out is copilot
I would do _ => ... Instead of (_,_) => ... But great video as always
Fair!
Didn't think about it when doing it in the video haha
this shit is by far the most confusing thing I've encountered in Dart so far.
Readability is absolutly awful, specialy the first example. I would instant deny the "if" line in my code reviews.
hi.. Thanks just tested and working
for (String key in monthMapKeys) {
if (eachType case final eachType?) {
for (var e in eachType.keys.toList()) {
if (!salesKeys.contains(e)) {
salesKeys.add(e);
}
}
}