Re: Signed and Unsigned integers in Tcl




Andreas Leitgeb schrieb:
Anyway I wonder in what way a leading "+" would have been
inferior to the trailing "u".

"+" means "positive", or "one or more" in regexps. Signed numbers can
also be positive :)
As "u" also means "unsigned" in [format] (though stand-alone, not as a
modifier), I think using "u2 is following the principle of least
surprise.

.



Relevant Pages

  • Re: print(true and true) #=> the parenthesis issue
    ... "What happened to the principal of least surprise? ... Your suggestive remarks are irritating at best. ... "principle of least surprise" because different expectations, patterns, ... It's fundamental - to good reason ...
    (comp.lang.ruby)
  • Re: ruby gnome question
    ... > Joe Van Dyk wrote: ... Is that the principle of Matz's least surprise ... One of the most basic facts you learn ...
    (comp.lang.ruby)
  • Re: print(true and true) #=> the parenthesis issue
    ... "What happened to the principal of least surprise? ... "principle of least surprise" because different expectations, patterns, ... I have seen it used in the game Wesnoth and what this basically means it ... But I am no language designer. ...
    (comp.lang.ruby)
  • Re: 9/11 - Its been 9 years
    ... stupid, vapid, generalizations about entire ethnic groups based on the ... Sorry you can't grasp that principle. ... While blatantly elitist (surprise, surprise) it IS what you are all ...
    (rec.sport.golf)
  • Re: Ruby floating point behavior typical of other langs??
    ... bradjpeek wrote: ... To me, this violates the "Principal of least surprise", ... Do you mean the "principle of least suprise"? ...
    (comp.lang.ruby)