New answers tagged

0

Your question is draws on a large article. But I’ll be shorter. Now I’am just learning Scala and also have similar question as your and I think answer on it will came on time to you while your experience in Scala will growing. You can pick up some well known projects and learning through reviewing code. Good way is to start to contribute project that you ...


1

The right answer involves a lot of, "Not quite," with a sprinkling of, "You have a point." First let's take a literal interpretation. Ruby has class methods and instance methods. Class methods are the methods of the class object. Instance methods are the methods of instances of that class. Inheritance is a relationship between class objects - calling ...


0

In this case I suspect that the Liskov principle would imply that now each subclass must also support .new without any arguments That's not correct. You require here that the metaobject of some class derived from BaseObject need to support niladic new, because the metaobject of BaseObject does. The LSP states that objects of a subclass must support ...


2

In this case I suspect that the Liskov principle would imply that now each subclass must also support .new without any arguments Your suspicion is wrong. The problem is that you're inferring from the base class's implementation what the base class's contract is. But they are two distinct things, even if not literally written out separately. In this ...


3

Languages vary greatly in how classes are manifest (i.e. at runtime). In some language systems, there is no runtime manifestation of a class, so Liskov is simply not applicable to classes. the runtime manifestation of all class is a direct instance (of some class like TYPE or CLASS, for example), and all they are is a token that represents a specific real ...



Top 50 recent answers are included