Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • It is often more important that the input source texts which are accepted by a language work as a programmer would expect, than that a language accept as large a fraction of source texts as possible. If a particular source text might plausibly by written by programmers wanting two very different things, and if it would be obvious how either could express their intention in a way that's slightly more verbose but is no longer ambiguous, requiring the verbosity may increase the likelihood that the language will achieve what the programmer is trying to do. Commented Oct 25, 2016 at 20:58
  • @supercat: absolutely -- working as "users meant" is supposed to be one of perl's design goals: the "do what I mean" goal. It's not good to thwart a user's intentions without good reason. Many programmers have difficulty remembering operator precedence, but not remembering a difference between data types "strings" & "numbers". Having operators that work on a specific data type work together, consistently, makes for clearer, cleaner code. Unfortunately, due to its complicated syntax, its dying out, with #users declining each year -- very sad, since it has many good features. Commented Oct 30, 2016 at 0:30
  • What irks me with hyper-modern C philosophy is that it suggests that compilers should go out of their way not to behave in logical fashion if smaller code could handle all the cases where the Standard would mandate behavior. Is any useful purpose served by having a compiler decide that given unsigned mul(unsigned short x, unsigned short y) { return x*y; } it should be allowed to behave in arbitrary fashion in cases where the product would exceed 2147483647? GCC will sometimes do exactly that. Commented Oct 30, 2016 at 2:12
  • Should they be "allowed", or "do they" [behave in an unspecified or arbitrary fashion]. Usually in situations like that, the language specification didn't specify how such situations should be handled (because "everyone knew xxyz"), and updates to the specification, in order not to make all the old specs "wrong" simply said such operations were "undefined" (ick/ug/poo!) I.e. its not malicious, but a matter of laziness in not specifying each "undefined" case for all cases... yeah, imperfect world... Commented Oct 30, 2016 at 3:32