Covariance and seven OOPLs

Track

Technologies & Solutions

Date and time

Monday, 10. October 2022., 15:25

Room

Hall D

Duration

45'

The topic is the covariance of non-generic parameters in seven OOP languages: C++, Eiffel, Java, C#, Scala, Kotlin, Swift (the order is from oldest to youngest).In the example, covariance is attempted to be applied to two related superclass/subclass pairs.In this particular case these are the classes Animal/Cow and Animal_food/Cow_food.In one procedure of the Animal class there is a parameter of the Animal_food class.Can we (in the languages listed above) in the Cow subclass make an overridden procedure that uses the Cow_food class instead of the Animal_food class?One language had this option from the beginning (late 80's), but this feature allowed a runtime error, which was somewhat resolved only in 2014.But there is another language (among the languages listed above) that makes this possible.Note: the use of generic parameters (and their covariance) is not the "right" solution (it is a solution, but with major practical drawbacks).

Lecture details

Talk Attendence: Attendance in person
Level of difficulty: Detailed
Group of activity: Technologies & Solutions

About speaker

Organizers

The conference is organized by the Croatian Association of Oracle users & Croatian Java Users Association. 

Like us on Facebook

We post news, photos and other interesting facts on official JavaCro Facebook Page.

Follow us on Twitter

Keep up to date with all the news on Twitter!

Platinum Sponsor

Golden sponsors

Silver sponsor

Media Sponsor