Hacker News new | past | comments | ask | show | jobs | submit login

> adhering to liskov substitution principles

what does this even mean?

> And has 10x less LoC than ts

Prolly b/c Flow isn't able to express the advanced types (albeit with 10x LoC) in the first place.




You can google, gpt or look at wikipedia for "liskov substitution principles". It's related to object oriented programming, more specifically to inheritance and what is allowed as substitution as superclass vs subclass depending on which position it sits in argument vs return value. It's very interesting read if you don't know about it and you're using OOP.

What advanced types do you have in mind?

ps. the way you're using "albeit" sounds like you think flow has 10x larger codebase, it has 10x smaller codebase


I know what SOLID is, questioning how exactly you think Flow has "liskov substitution" as a feature.


L in SOLID refers to Liskov substitution principles.

It's the only one from the SOLID list which can be typechecked - others are design principles.

"Flow adhering to it" means that violating code will be flagged by type system.

It matters because unlike other principles, violations can cause runtime errors.


> L in SOLID refers to Liskov substitution

you think?

> Flow adhering to it" means that violating code will be flagged by type system

Shocking that type system can flag things




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: