DEV Community

Discussion on: Typescript and SOLID

Collapse
 
stereobooster profile image
stereobooster

It is immediate technical debt. It's a code smell/anti patter

This is just your opinion. Other people may have another

Ok semantics aside

Semantics is meaning. If we are not talking about meaning, what are we talking about?

Pure function can do one thing, but as well can do many things, it will not change it's pureness.

This is core idea of pure functions, you can combine them and as the result you get new pure function (which is not doing "one thing" anymore). Pureness is about absence of side effects.

On the other function method in object can have single responsibility but the same time it can do some side effect, e.g. it will not seamlessly compose.

Thread Thread
 
jwp profile image
John Peters

..this is the core idea of pure functions... yes composition at it's best.

Yes my opinions are strong on single responsibility, indeed and I stick by them. Notice I never made mention of side effects, that's a whole different topic.