• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Parametric Polymorphism

 
Ranch Hand
Posts: 481
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the designing a language is it required to include parametric polymorphism? What would be your justification for your decision?
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Karu Raj wrote:What would be your justification for your decision?



You mean, if we were to create a programming language? Well, if it was an object-oriented programming language, supporting polymorphism would be mandatory, since it is by definition one of the pillars of object orientation.
 
Karu Raj
Ranch Hand
Posts: 481
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I meant parametric polymorphism why is it important to have it
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Karu Raj wrote:I meant parametric polymorphism why is it important to have it



This sounds very much like an academic or interview question. Why do you think parametric polymorphism is important? Can you think of a language that does not support it? How does that effect the kinds of solutions you can implement?
 
Bartender
Posts: 4568
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, as I understand it, in Java parametric polymorphism means generics. If you've used older versions of Java that didn't have generics, hopefully you'll have seen the advantages it can give you.

But I think you could argue that the term doesn't really apply to dynamically typed languages. Which means that it's certainly not an essential feature, because lots of people use dynamic languages (and prefer them).
 
reply
    Bookmark Topic Watch Topic
  • New Topic