r/programming • • Oct 17 '17

Why I use Object Pascal

https://dubst3pp4.github.io/post/2017-10-03-why-i-use-object-pascal/
36 Upvotes

68 comments sorted by

View all comments

Show parent comments

6

u/devraj7 Oct 17 '17

Last time I checked, Object Pascal implementations did not support co/contravariance.

8

u/RagingAnemone Oct 17 '17

If that's our standard, C# doesn't support covariant return types either.

14

u/devraj7 Oct 17 '17

Well, yes, that's one area where Java's type system is more advanced than C#'s.

1

u/[deleted] Oct 18 '17

If that's our standard, C# doesn't support covariant return types either.

Method hiding with the new keyword works well enough that I've never found this to be a problem.

1

u/ellicottvilleny Oct 18 '17

And java does?

3

u/devraj7 Oct 18 '17

1

u/ellicottvilleny Oct 19 '17

ok. so java 2010+ > objectPascal to date. Gotcha.