The Difference between Sealed Interfaces & Sealed Classes!

  Рет қаралды 845

Charfaoui Younes

Charfaoui Younes

Күн бұрын

Пікірлер: 6
@BelukaOG
@BelukaOG 2 ай бұрын
finnally we can know why we need those sealed interfaces , thanks
@hinocenciopaulo
@hinocenciopaulo 5 ай бұрын
Finally someone that could make me understand why we need sealed interfaces. Thank you!
@CharfaouiYounes
@CharfaouiYounes 5 ай бұрын
My pleasure man 🫡🫡
@rob92400
@rob92400 5 ай бұрын
Hello! Do you think that, in the simple casese where we don't need a complex hierarchy, sealed classes and sealed interfaces are interchageable? I'm working on a project where developers tend to migrate from sealed classes to sealed interface for the sole purpose of sparing a couple of parenthesis. In my mind, the interface approach is more appropriate when there's behaviours (rather than properties) than need to be shared, so it leads to unproductive discussions :) It seems that Kotlin basically provides 2 ways to achieve very similar results, but they both stem from different concepts at the Java level. What do you think about this?
@iyadzac
@iyadzac 5 ай бұрын
what about performance and memory? i think sealed interfaces don't need to instantiated, right?
@CharfaouiYounes
@CharfaouiYounes 5 ай бұрын
Yeah but this is too negligible, and you won't notice any difference in performance at all!
DON'T Do this Mistake with derivedStateof!
11:26
Charfaoui Younes
Рет қаралды 875
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
人是不能做到吗?#火影忍者 #家人  #佐助
00:20
火影忍者一家
Рет қаралды 20 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Fix Your Controllers By Refactoring To Minimal APIs
14:56
Milan Jovanović
Рет қаралды 46 М.
JavaScript Event Loop -- Visualized!
29:43
ColorCode
Рет қаралды 26 М.
Use THESE Tricks for Efficient Bug Fixing 🐞!
22:18
Charfaoui Younes
Рет қаралды 667
Sealed Classes and Interfaces - Java Programming
11:21
Will Tollefson
Рет қаралды 2,4 М.
Sealed Classes for UI State are an ANTI-PATTERN - Here's why!
9:53
Philipp Lackner
Рет қаралды 24 М.
Refactoring a React component - Design Patterns
15:19
Cosden Solutions
Рет қаралды 101 М.
Sealed Classes/Interfaces VS Enum Classes in Kotlin
9:12
Konstantinos Reppas
Рет қаралды 1,3 М.
Automatically Make YOUR Code Spotless!
13:07
Charfaoui Younes
Рет қаралды 1 М.
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН