Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

What is duck typing?

It is a term used in dynamic languages that do not have strong typing.

The idea is that you don’t need a type in order to invoke an existing method on an object – if a method is defined on it, you can invoke it.

The name comes from the phrase “If it looks like a duck and quacks like a duck, it’s a duck”.

Wikipedia has much more information.

Related Posts:

  1. Why is Verilog not considered a programming language?
  2. What is the := operator?
  3. Difference between masm32 and masm?
  4. What is the meaning of the term “thread-safe”?
  5. What is the difference between statically typed and dynamically typed languages?
  6. Compiled vs. Interpreted Languages
  7. What is the difference between syntax and semantics in programming languages?
  8. What languages are Windows, Mac OS X and Linux written in?
  9. Setting std=c99 flag in GCC
Categories programming languages Tags duck-typing, programming-languages
SQL error “ORA-01722: invalid number”
VMWare Workstation Pro can’t run on Windows [closed]

Leave a Comment Cancel reply

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress