Skip navigation


warning: Creating default object from empty value in /var/www/vhosts/ on line 33.
Original author: 
Stack Exchange

Stack Exchange

This Q&A is part of a weekly series of posts highlighting common questions encountered by technophiles and answered by users at Stack Exchange, a free, community-powered network of 100+ Q&A sites.

Where have all the user-defined operators gone? tjameson can't "find any procedural languages that support custom operators in the language," he writes. "There are hacks (such as macros in C++), but that's hardly the same as language support." Is there any good reason we can't write our own operators? See the original question here.

Are you experienced?

Karl Bielefeldt answers (94 votes): There are two diametrically opposed schools of thought in programming language design. One is that programmers write better code with fewer restrictions, and the other is that they write better code with more restrictions. In my opinion, the reality is that good experienced programmers flourish with fewer restrictions, but that restrictions can benefit the code quality of beginners. User-defined operators can make for very elegant code in experienced hands, and utterly awful code by a beginner. So whether your language includes them or not depends on your language designer's school of thought. Related: "How are operators saved in memory?"

Read 4 remaining paragraphs | Comments

Your rating: None

Monads and Gonads

Google Tech Talk January 15, 2013 (more info below) Presented by Douglas Crockford ABSTRACT The wonders of monads are finally revealed without resorting to C...

More in
Science & Technology

Your rating: None