Skip to main content
edited body
Source Link
Basilevs
  • 3k
  • 1
  • 17
  • 17

LSP does not apply to constructors because in most languagelanguages instantiation is impossible without explicit type specification. Therefore the only contract for MySpecialLabel() is not to break internal lifetime scoped invariants which is impossible anyway in OOP languages.

So you code violates LSP no more than any Java code using objects without creation patterns.

LSP does not apply to constructors because in most language instantiation is impossible without explicit type specification.

So you code violates LSP no more than any Java code using objects without creation patterns.

LSP does not apply to constructors because in most languages instantiation is impossible without explicit type specification. Therefore the only contract for MySpecialLabel() is not to break internal lifetime scoped invariants which is impossible anyway in OOP languages.

So you code violates LSP no more than any Java code using objects without creation patterns.

Source Link
Basilevs
  • 3k
  • 1
  • 17
  • 17

LSP does not apply to constructors because in most language instantiation is impossible without explicit type specification.

So you code violates LSP no more than any Java code using objects without creation patterns.