Questions tagged [object-oriented]
For questions about object-oriented concepts including encapsulation, polymorphism, and inheritance, or for questions about object-oriented languages that are built around these concepts.
5 questions from the last 365 days
0
votes
1
answer
209
views
Can WillThrow as a Bottom Type of a Full-Lattice Type Theory take the thrown Exception Type as Covariant Type Argument?
Context:
Let us assume a full-lattice type theory with at least types any, bool, Exception, <...
7
votes
0
answers
299
views
Are there languages having multiple level fine control over deep and shallow copy?
A reference or level-0 copy is the same object as the original, only accessed differently.
A level-1 shallow copy is a new object, with every member a reference to the member under the same name in ...
5
votes
1
answer
341
views
Can final and full lattice type theory be combined?
Let us assume a language that has final with Java semantics, i.e. a final type cannot have subtypes. Further, let that language have a full lattice type theory with at least one bottom type, e.g. ...
4
votes
4
answers
418
views
Is it meaningful to disallow member variables in interfaces?
In an object oriented language with single inheritance, there is often the concept "interface", separate from classes, as a replacement of what would otherwise require multiple inheritance. ...
7
votes
1
answer
402
views
How to design interfaces to mimic haskell-like type classes in an object oriented language?
A problem I sometimes run into when using a language like TypeScript or C# is
how they lack a perfect analogue to Haskell's typeclasses. Let's use
Haskell's Functor ...