News for hackers. Stuff that matters.
Re:G.E.R.T: Golang Embedded Run-Time by bsaul on Tuesday October 31, 2017 @07:31AM (#15592418)
You can indeed, but it makes you duplicate every implementation with its associated interface.

As for this kind of relationship, i'd say it's fairly widespread. One proof is that even relationnal DB such as postgresql added table inheritance.

Re:G.E.R.T: Golang Embedded Run-Time by jerf on Tuesday October 31, 2017 @09:06AM (#15592901)
"You can indeed, but it makes you duplicate every implementation with its associated interface."

Only if A: composition can't do the job somehow and B: you can't use perfectly normal factoring tools to do the work.

While I will tell you before anybody else complains that there is a non-zero percentage of the time that will happen, I will also tell you the average person who has never tried Go yet complains about its lack of generics anyhow will overestimate the amount of time that happens by a good order of magnitude or two.

Re:G.E.R.T: Golang Embedded Run-Time by bsaul on Tuesday October 31, 2017 @12:02PM (#15594223)
One remark (that may seem like a nitpick, but is in fact crucial) : composition doesn't say it "is a kind of", but rather "it has".

It's the two most fundamental concept of any language : to be vs to have. Now it may or may not be just a philosophical difference and bring no practical consequences to a computer program, but at the minimum one can say it expresses two different concepts.

Re:G.E.R.T: Golang Embedded Run-Time by lucian1900 on Tuesday October 31, 2017 @08:07AM (#15592588)
Table inheritance is merely an optimisation and rarely used.
Re:G.E.R.T: Golang Embedded Run-Time by bsaul on Tuesday October 31, 2017 @09:58AM (#15593244)
It's an optimisation against the OOP vs relational mismatch, but the fact that it's here proves that OOP subclassing is being used quite often (otherwise there wouldn't be any need to optimise for it, at least not by adding core features to pg).
Re:G.E.R.T: Golang Embedded Run-Time by pjmlp on Tuesday October 31, 2017 @10:02AM (#15593271)
All major RDMS offer OOP at table level.