Top "Polymorphism" questions

In computer science, polymorphism is a programming language feature that allows values of different data types to be handled in a uniform manner.

What is compile-time polymorphism and why does it only apply to functions?

What is compile-time polymorphism and why does it only apply to functions?

c++ polymorphism compile-time
Benefit of Polymorphism

When I started to look for the benefits of polymorphism, I found with this question here. But here I was …

java oop jakarta-ee polymorphism
Why doesn't polymorphism work without pointers/references?

I did find some questions already on SO with similar title- but when I read the answers they were focussing …

c++ pointers polymorphism virtual
Setting up a polymorphic has_many :through relationship

rails g model Article name:string rails g model Category name:string rails g model Tag name:string taggable_id:…

ruby-on-rails-3 polymorphism
dynamic_cast across a shared_ptr?

I have two classes A and B, B inherits from A. If I have a shared_ptr<A> …

c++ polymorphism shared-ptr dynamic-cast
Metamorphic Code Examples

I understand the concept of Polymorphic and Metamorphic code but I recently read the Wikipedia page on both (for what …

polymorphism
Overloading is compile-time polymorphism. Really?

I do know the syntactical difference between overriding and overloading. And I also know that overriding is run-time polymorphism and …

java polymorphism overloading overriding method-dispatch
How to model a RESTful API with inheritance?

I have an object hierarchy I need to expose through a RESTful API and I'm not sure how my URLs …

api rest inheritance polymorphism
Laravel - Eager Loading Polymorphic Relation's Related Models

I can eager load polymorphic relations/models without any n+1 issues. However, if I try to access a model related …

laravel eloquent polymorphic-associations eager-loading polymorphism
Vector of objects belonging to a trait

Consider the following code: trait Animal { fn make_sound(&self) -> String; } struct Cat; impl Animal for Cat { …

polymorphism rust