Pattern Matching in Dart 3 is Powerful!

  Рет қаралды 10,807

Robert Brunhage

Robert Brunhage

Күн бұрын

Пікірлер: 48
@artofnessa
@artofnessa Жыл бұрын
WOOOOO!! pattern matching for the winn
@sadhlife
@sadhlife Жыл бұрын
good to hear. it's a nice language feature for dart/flutter
@ahmdaeyz
@ahmdaeyz Жыл бұрын
I like how you casually explained type promotion at 1:42
@wizzl8513
@wizzl8513 Жыл бұрын
We need more of this, great content!
@RobertBrunhage
@RobertBrunhage Жыл бұрын
Thanks, appreciate it! Any recommendations of what you would like to see?
@wizzl8513
@wizzl8513 Жыл бұрын
@@RobertBrunhage Tips and use cases for new/existing language features. It saves a lot of time not having to read the documentation
@truemmer
@truemmer Жыл бұрын
I really like the new features for Dart 3.0, but I fear that readability will suffer in many projects 😅
@mtux
@mtux Жыл бұрын
Thanks a lot, great video
@poncewilmer
@poncewilmer 11 ай бұрын
THANKS
@FlutterMapp
@FlutterMapp 4 ай бұрын
First, is the background made in blender? If yes, thats pretty damn cool, second, we need more content from you :)
@draakisback
@draakisback Жыл бұрын
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.
@_underscore
@_underscore Жыл бұрын
Also in C++ "Function Overloading".
@rsajdok
@rsajdok Жыл бұрын
Good explanation 🙂
@RobertBrunhage
@RobertBrunhage Жыл бұрын
Tyty!
@rumble1925
@rumble1925 Жыл бұрын
Nice. This is something I miss in every language since trying one that has it
@toxaq
@toxaq 9 ай бұрын
I wish you were still making videos!
@sujalabhani980
@sujalabhani980 Жыл бұрын
finally a creator that makes something new and good.🙂
@yorjansandoval9381
@yorjansandoval9381 2 ай бұрын
se puede usar el inspector de widgets en neovim? yo no he podido usar neovim para flutter por esa razon.
@firelight22
@firelight22 Жыл бұрын
I didn't know about the fact you could add 2 variables into the switch statement :O
@noelgomile3675
@noelgomile3675 Жыл бұрын
This is going to be awesome with Flutter for making it easier to model logic for dynamically picking which widget to show
@ArjunSinghh
@ArjunSinghh 17 күн бұрын
Gr8 this is dart shorts helps to impoverished dart
@jackwarner1018
@jackwarner1018 Жыл бұрын
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?
@trainofthought5733
@trainofthought5733 Жыл бұрын
bloc + pattern matching. makes life easier
@subsoho
@subsoho Жыл бұрын
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.
@sirk3v
@sirk3v Жыл бұрын
which editor is this?
@RobertBrunhage
@RobertBrunhage Жыл бұрын
NeoVim :) The best editor that has ever existed
@鄭小白-n4p
@鄭小白-n4p 6 ай бұрын
hi, can you teach how to setup vim with flutter env?
@tayabfarooq7544
@tayabfarooq7544 Жыл бұрын
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!
@sexyeur
@sexyeur Жыл бұрын
You'll have to "shake" back later.
@antongrekov7710
@antongrekov7710 10 ай бұрын
rip legend
@nested9301
@nested9301 6 ай бұрын
Is he dead?
@rebarius
@rebarius Жыл бұрын
I‘m just here for the „3“ ❤
@vikasdwivedi7769
@vikasdwivedi7769 11 ай бұрын
Hey Robert still you think Flutter had good future, bcz there are very less project exist for flutter. Your suggestion.
@mikopiko
@mikopiko Жыл бұрын
You must be from Sweden, I can hear it!
@RobertBrunhage
@RobertBrunhage Жыл бұрын
SwEDen sWeDEN SWEDEN!!!
@mikopiko
@mikopiko Жыл бұрын
@@RobertBrunhage Göteborgare?
@RobertBrunhage
@RobertBrunhage Жыл бұрын
Yeyeyeyeye
@mikopiko
@mikopiko Жыл бұрын
@@RobertBrunhage Näe lägg av
@olamilekanadeleke6806
@olamilekanadeleke6806 Жыл бұрын
What IDE is that... And why is everyone hating on vs code, did I miss something 😅
@TechBuddy_
@TechBuddy_ Жыл бұрын
It's neovim and we hate vs code cuz 1. It's a Microsoft product 2. Consumes a lot of memory 3. Super slow
@RobertBrunhage
@RobertBrunhage Жыл бұрын
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
@sirk3v
@sirk3v Жыл бұрын
@@RobertBrunhage is that autocomplete from copilot or is it just inbuilt?
@RobertBrunhage
@RobertBrunhage Жыл бұрын
@@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
@TechBuddy_
@TechBuddy_ Жыл бұрын
I would do _ => ... Instead of (_,_) => ... But great video as always
@RobertBrunhage
@RobertBrunhage Жыл бұрын
Fair! Didn't think about it when doing it in the video haha
@robschannel1156
@robschannel1156 5 ай бұрын
this shit is by far the most confusing thing I've encountered in Dart so far.
@BonBaisers
@BonBaisers Жыл бұрын
Readability is absolutly awful, specialy the first example. I would instant deny the "if" line in my code reviews.
@mazharsalam3144
@mazharsalam3144 2 күн бұрын
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); } } }
Bringing pattern matching to Dart
20:28
Flutter
Рет қаралды 39 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 496 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Cat mode and a glass of water #family #humor #fun
00:22
Kotiki_Z
Рет қаралды 42 МЛН
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Records & Patterns - Get started with the newest addition in Dart 3.0
11:30
Flutter Explained
Рет қаралды 2,6 М.
Top 5 Flutter Tips for Big Projects
5:55
Robert Brunhage
Рет қаралды 72 М.
These Dart Tips Will Change Your Life
17:49
Hussain Mustafa
Рет қаралды 1,7 М.
Dart 3 Records Are Awesome
4:31
Robert Brunhage
Рет қаралды 14 М.
Arenas, strings and Scuffed Templates in C
12:28
VoxelRifts
Рет қаралды 100 М.
35 Flutter Tips That Will Change Your Life
10:53
Flutter Mapp
Рет қаралды 314 М.
15 Flutter Tips That MIGHT Improve Your Work
4:10
Robert Brunhage
Рет қаралды 24 М.
What's New in Dart 3?
30:09
Rivaan Ranawat
Рет қаралды 28 М.
This is my approach to state management in Flutter
4:47
Robert Brunhage
Рет қаралды 4,1 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.