Тёмный

Java 17 to 20 Pattern Matching Full tutorial with Records, Instanceof and Switch - JEP Café #14 

Java
Подписаться 182 тыс.
Просмотров 17 тыс.
50% 1

Наука

Опубликовано:

 

7 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 55   
@Jamie35719
@Jamie35719 9 месяцев назад
Feel like I could watch this gentleman talk about Java all day long. This is my third video. Love the content and delivery!
@java
@java 9 месяцев назад
Glad you enjoyed it!
@mikaelogren
@mikaelogren Год назад
Really appreciate these videos and the format of them! Thanks!
@java
@java Год назад
Glad you like them!
@ppdmartell
@ppdmartell Год назад
I like these kind of videos. Seems to me like finding hidden pearls to be used.
@arthurezeagbo3986
@arthurezeagbo3986 Год назад
It gives me joy listening and learning from you. Thank you sir!
@java
@java Год назад
So nice of you
@larryd9577
@larryd9577 Год назад
I'm really looking forward to Java 21
@gabrielfreitas4270
@gabrielfreitas4270 Год назад
Man your pfp are the dudes from my work "Wait, is there any Java version after 8?"
@larryd9577
@larryd9577 Год назад
@@gabrielfreitas4270 I am running with this pfp for a decade now. And I've seen fireships video as well.
@dvyadav2307
@dvyadav2307 5 месяцев назад
Nice and clear explanations. All I need now is a java cup ☕
@dennisvanmierlo
@dennisvanmierlo Год назад
Hi Jose, A great video! You are a great teacher. I love your courses on Pluralsight. Thank you and enjoy your Java coffee ☕ Lot’s of greetings, Dennis 🇳🇱
@captainjava1
@captainjava1 Год назад
Around 11:00, I think switch(Shape shape) should be just switch(shape), with the variable previously declared... I'm enjoying the video enough to be trying examples with the Early Access release and old-school command-line javac and java commands!
@Muescha
@Muescha Год назад
that was also a question i see at this point - whats the right feature?
@mlouiedc
@mlouiedc Год назад
Nicely delivered, clear and simple.
@vortexmodeling
@vortexmodeling Год назад
Cool, do you know what also is cool? The Java coffee cup you got! Would love to have one on my desk and flex on my colleagues : )
@JosePaumard
@JosePaumard Год назад
😄Thanks!
@AkhileshKumar-cs2kh
@AkhileshKumar-cs2kh Год назад
Thanks for the awesome video
@JosePaumard
@JosePaumard Год назад
Thanks!
@redcrafterlppa303
@redcrafterlppa303 Год назад
It would be great if record patterns could be used on assignments like this: Point(int x, int y) = foo.getPoint();
@JosePaumard
@JosePaumard Год назад
That's part of the future plans. Maybe it will come?
@aloussase
@aloussase Год назад
Nice! Next steps: pattern matching in function and lambda arguments
@rolandinnamorato1953
@rolandinnamorato1953 Год назад
Super Java evolution
@svalyavasvalyava9867
@svalyavasvalyava9867 Год назад
Thank you so much for this video!
@redcrafterlppa303
@redcrafterlppa303 Год назад
9:00 this is great. But the syntax is unnatural. I wonder if there is a syntactic better way to expose s to the rest of the method that is more clear.
@zohahs5276
@zohahs5276 Год назад
Nice do you have a full course on Java core programming from A to Z thanks.
@amirhosseindolatkhah2924
@amirhosseindolatkhah2924 Год назад
Adding features to java is making me an old man, how slowly it is going on.
@RakeshKumar-tu6bi
@RakeshKumar-tu6bi Год назад
In for(Points(double x, double y) : pts) instead of having to mention double data type every time it is better to provide a generic type so as to avoid exception while iterating. *Generic types can be bounded* One more thing is that there could be a third point for z-axis(double z) so there must be an overloaded constructor. So it is much better to have a vararg parameter. I don't how this will affect performance and memory. I haven't read the docs properly so it's just an idea from this video.
@tanveerhasan2382
@tanveerhasan2382 Год назад
You can use _for(Points(var x, var y) : pts)_ instead of mentioning double twice
@cya3mdirl158
@cya3mdirl158 Месяц назад
Fortunately we have Kotlin. In Kotlin code is more expressive.
@jorgerangel2390
@jorgerangel2390 Год назад
Is it too difficult for the language to infer the type of o based on the assertion in the if statement so inside the if o is an string without the need of a new variable?
@JorgetePanete
@JorgetePanete Год назад
Would it be a good idea to be able to have more than one variadic parameter, such that one takes the odd elements and the other takes the even elements? Useful for Map.of
@hellowill
@hellowill Год назад
Will there be boolean only patterns when you've got a single type? E.g. List is Empty -> ... default -> ...
@fertiz_
@fertiz_ Год назад
just check with `if` condition, I think there is no need for that in switch
@RichardKures
@RichardKures Год назад
@@fertiz_ You can use: case List l when l.isEmpty() -> { } instead of the if.
@whitewoodcity9612
@whitewoodcity9612 Год назад
Why not release switch pattern directly? AFAIK, preview feature should be completed in 12 months
@JorgetePanete
@JorgetePanete Год назад
It's in preview to receive feedback, and the development time depends entirely on the feature...
@JosePaumard
@JosePaumard Год назад
Sometimes but not always. Some may even be removed without becoming final features. It happened with Raw String. It all depends on the feedback.
@stIncMale
@stIncMale Год назад
17:55 - `for` loop throwing exception if an `Iterable` is empty when pattern matching is used is just terrible, insane even, and is absolutely counter intuitive.
@alessioantinoro5713
@alessioantinoro5713 Год назад
Not when it is empty, when it contains null values
@JosePaumard
@JosePaumard Год назад
I'm not so sure that putting null values in a collection is a such great idea 😄
@stIncMale
@stIncMale Год назад
​@@alessioantinoro5713 Oh, thanks! I re-watched, and I still hear "especially if you have NO elements in this list" if I don't make effort to really listen and hear "NULL elements", now that I know what the phrase actually is. Of course, with `null` elements that behavior totally makes sense.
@stIncMale
@stIncMale Год назад
@@JosePaumard I misheard the phrase and confused "NULL elements" with "NO elements".
@alessioantinoro5713
@alessioantinoro5713 Год назад
@@stIncMale No wonders! It happens
@IfeSunmola
@IfeSunmola 9 месяцев назад
8:39 is really weird. Everyone that has used curly brace languages knows variables only exist in the { } they're declared in. Sure, it's not hard to wrap your head around it, but maybe it could have been done in another way ...
@vat78nnov
@vat78nnov Год назад
Pattern matching is required for functional programming. But this is anti-pattern in OOP (example with Shape is not in OOP style) And on practice people will use it for creating ugly procedural code
@BangsarRia
@BangsarRia 26 дней назад
This is niche. In a case where you are already using runtime polymorphism and you want to add an ancilliary feature that would violate other principles, switch with lambda can provide an easier and more readable solution. Nicholai Parlog has a RU-vid where he codes suitable examples.
@betancour
@betancour Год назад
Java is looking very LISP with those Parentheses...
@AkhileshKumar-cs2kh
@AkhileshKumar-cs2kh Год назад
Happy to see that java is copying useful features from other languages, but worried it will ruin existing ones
Далее
Java 21 Pattern Matching Tutorial #RoadTo21
23:28
Просмотров 26 тыс.
ПРОСТИ МЕНЯ, АСХАБ ТАМАЕВ
32:44
Просмотров 2,2 млн
لدي بط عالق في أذني😰🐤👂
00:17
Modern Java - Top Features of Java 9 to 17
20:19
Просмотров 90 тыс.
Pattern Matching in Java by Venkat Subramaniam
1:01:22
Why Most Programmers DON'T Last
18:56
Просмотров 306 тыс.
Java 21 new feature: Virtual Threads #RoadTo21
33:35
Просмотров 62 тыс.
iPhone 15 Pro Max vs Pixel 9 🚀
0:18
Просмотров 183 тыс.