Measures Concepts
GitHub icon

Polymorphism

Polymorphism - language feature

< >
Example from JavaScript, TypeScript:
"a" + "b"; 1 + 2
Example from Elixir:
https://hexdocs.pm/elixir/Protocol.html
Example from Speedie:
|object| x = somefunction() || y = x.render // returns a string by calling the virtual func "render"
Example from Felix:
// overloads fun f (x:double) => x +42.1; fun f (x:int) => x + 1; fun f (x:string) => x + "!";

Languages with Polymorphism include JavaScript, Pascal, TypeScript, Elixir, Speedie, Felix, ADLIB, Extended Pascal

Languages without Polymorphism include Jule

This question asks: Does the language have polymorphism?

Read more about Polymorphism on the web: 1.

HTML of this page generated by Features.ts

View source

- Build the next great programming language Search Add Language Features Creators Resources About Blog Acknowledgements Queries Stats Sponsor Day 605 feedback@pldb.io Logout