Remix.run Logo
FpUser 6 hours ago

How about not favoring anything. There are many paradigms and each one has its place. Franky I do not really understand why do developers fight these religious wars about languages, frameworks etc.

bccdee 4 hours ago | parent [-]

> There are many paradigms and each one has its place.

That's a thought-terminating cliché. The argument against inheritance has been laid out pretty clearly. It's reasonable to rebut that argument. It's not reasonable to say, "you shouldn't criticize inheritance because Everything Has Its Place." Everything does not have its place. Sometimes we discover that something is harmful and we just stop using it.

lucketone 2 hours ago | parent | next [-]

Em.. I’m quite nitpicky and want to do the opposite of “thought-terminating”.

I’m for encouraging best practice, but most things do have its place. I present to this court two examples:“premature optimisation is root of all evil” and “goto statement considered harmful”.

Both well accepted as things should be avoided for good reasons (incl. but not limited to, preserving sanity of coworkers)

But both definitely “have its place”. First one’s place is legitimized (with nuance) by author himself in second part of same sentence. The latter one (goto) is routinely used by linux devs (random example: https://github.com/torvalds/linux/blob/master/fs/ext4/balloc...)

> we just stop using it. We minimise/restrict the usage.

bigstrat2003 4 hours ago | parent | prev | next [-]

> Sometimes we discover that something is harmful and we just stop using it.

And that is not remotely the case here. So yeah, there are many paradigms and each has its place.

bccdee 3 hours ago | parent [-]

> And that is not remotely the case here.

Isn't it? People have written extensively about why we should prefer composition to inheritance, and you haven't mounted any defence of inheritance beyond the thought-terminating cliché that it "has its place."

lucketone 2 hours ago | parent | next [-]

- Wording uses “prefer”, not “forbid”.

- (java) Least interesting example to rebuke “never”: exceptions, interfaces.

- (java) inheritance is used by active and successful projects (e.g. junit5, spring framework). I would argue that success is a pragmatic vindication criteria of a tool/technology.

FpUser 2 hours ago | parent | prev [-]

I use both where choosing what I believe is appropriate for particular case.

Frankly I do not give rat's ass about what "People have written extensively". From what I read most of it sounds like spoken by politician: look Jimmy, someone can do a bad thing with it. Well fuckin don't do a bad thing.

So much over very simple and primitive thing: John HAS a key vs dog IS an animal. Both are valid and proper.

>"you haven't mounted any defense"

Why would I bother. It does not need a defense. It is like do not use Java because it encourages FactoryFactoryFactory, 20 level of abstraction etc. Well it does not. Architecture astronauts do it and I am not one of those

FpUser 2 hours ago | parent | prev [-]

>""you shouldn't criticize inheritance"

I was not talking about criticizing. Valid critique us useful and deserved. And this concerns composition as well as any other area. I was talking about crusades by programmers.