Skip to Main Content
The D Programming Language
book

The D Programming Language

by Andrei Alexandrescu
June 2010
Intermediate to advanced content levelIntermediate to advanced
456 pages
14h 48m
English
Addison-Wesley Professional
Content preview from The D Programming Language

Chapter 12. Operator Overloading

We programmers tend to dislike excessive separation between built-in types and user-defined types. Endowing built-in types with magic properties works against the openness and extensibility of any language because user-defined types are forever condemned to second-class status. Yet language designers have legitimate reasons to give built-in types the red carpet treatment. One such reason is that a language that’s too configurable becomes difficult to teach and also difficult to parse both by the human and by the machine. Each language tries to strike a good balance between the built-in and the configurable, some making it a point to get close to one of the two extremes.

D’s take on the matter is pragmatic: it ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Advanced UNIX Programming, Second Edition

Advanced UNIX Programming, Second Edition

Marc J. Rochkind
Learn LLVM 12

Learn LLVM 12

Kai Nacke

Publisher Resources

ISBN: 9780321659538Purchase book