Tag

duck typing

0 views collected around this technical thread.

Code Mala Tang
Code Mala Tang
Apr 6, 2025 · Fundamentals

Why Overusing isinstance() Makes Python Code Rigid – Better Practices

This article explains why relying heavily on Python's isinstance() for type checking leads to less flexible code, introduces the EAFP vs. LBYL philosophies, and shows when isinstance() is appropriate through clear examples and best‑practice guidelines.

Best PracticesEAFPPython
0 likes · 8 min read
Why Overusing isinstance() Makes Python Code Rigid – Better Practices
Test Development Learning Exchange
Test Development Learning Exchange
Sep 25, 2024 · Fundamentals

Duck Typing and Polymorphism in Python

This article explains duck typing and polymorphism in Python, two fundamental object-oriented programming concepts, with practical code examples demonstrating how objects can be treated based on their behavior rather than their type.

Dynamic TypingPythonduck typing
0 likes · 8 min read
Duck Typing and Polymorphism in Python
IT Services Circle
IT Services Circle
Jan 13, 2024 · Fundamentals

Understanding TypeScript’s Type System: Common Pitfalls and a Systematic Learning Path

The article recounts the author’s repeated struggles with TypeScript, explains why treating it merely as a JavaScript superset leads to confusion, and provides a step‑by‑step, concept‑focused approach—including structural typing, conditional types, and practical code examples—to master the language’s type system.

Type SystemTypeScriptconditional types
0 likes · 8 min read
Understanding TypeScript’s Type System: Common Pitfalls and a Systematic Learning Path
Xueersi Online School Tech Team
Xueersi Online School Tech Team
Dec 20, 2019 · Fundamentals

Understanding Duck Typing and Interface Implementation in Go

This article analyzes Go's duck typing and interface mechanisms, explaining how interfaces are defined, implemented, and converted at runtime, including details of underlying structures like iface and eface, method sets, pointer vs value receivers, and type assertions, supplemented with code examples and assembly insights.

GoType Assertionduck typing
0 likes · 22 min read
Understanding Duck Typing and Interface Implementation in Go
Didi Tech
Didi Tech
May 9, 2019 · Fundamentals

Deep Dive into Go Interfaces: Duck Typing, Receivers, Interface Internals, and Polymorphism

The article thoroughly examines Go’s interface system, explaining static duck typing, the differences between value and pointer receivers, the internal iface/eface structures, how interfaces are constructed and converted, compiler implementation checks, type assertions, runtime polymorphism, and contrasts these mechanisms with C++ abstract‑class interfaces.

GoType Assertionduck typing
0 likes · 39 min read
Deep Dive into Go Interfaces: Duck Typing, Receivers, Interface Internals, and Polymorphism