Re: unusual OR syntax



Richard Riley wrote:
"Peter H. Coffin" <hellsop@xxxxxxxxxxxxx> writes:

On Fri, 27 Nov 2009 18:02:34 +0100, Richard Riley wrote:

Erwin Moller
<Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx> writes:

Richard Riley schreef:

Erwin Moller
<Since_humans_read_this_I_am_spammed_too_much@xxxxxxxxxxxxxxxx>
writes:

A lot of uncertainty, that is why I don't like the approach. The
same can be achieved without using short circuit evaluation, thus
avoiding all these assumptions and possible confusion. [end story
from my early programming days]
There is no uncertainty. It's a feature of the language. Not using
the features of the language is a crime in itself.
What you call a feature I call an annoying artifact. ;-)
Artifact?
http://www.dictionary.net/artifact NB esp. definition 4.

I know what an artifact is. Lazy evaluation is not an artifact of any
kind. It is a common sense language feature which evaluates a sequence
of expressions until one returns a non "nil" value.

No, its a simple way to turn an IF statement into machine code. That happens to have that side effect.

Saves machine code to do it that way.

That's why its in there.

Its not a feature, its a bug that was documented, and has been left in, because its efficient.
.



Relevant Pages

  • Re: Code Guidelines
    ... The language lets you do a lot of things. ... is the feature which was specially designed. ... possible to dynamically augment any other user-defined objects (but ... functionality directly on object – ...
    (comp.lang.javascript)
  • Re: Relative merits of Lisp-1 vs. Lisp-2?
    ... If reading data that might be ill-formed, defining your language to ... to dismiss my concern about this issue as irrelevant and unimportant, ... This argument would apply to *any* proposed new feature, ... incompatibilities were simply the result of someone doing something ...
    (comp.lang.lisp)
  • Re: That are the strong points of Tcl?
    ... the features are that keep people within the Tcl language. ... Tk is a feature. ... Needs some documentation though... ...
    (comp.lang.tcl)
  • Re: Graphic GUI C
    ... features in C99) is also a feature of C++. ... expect the C language and the C standard library to do everything; ... nothing is more commonplace than the need for one or more libraries in ... The same is true inside of WSH where all of the functionality ...
    (comp.lang.c)
  • Re: Code Guidelines
    ... system (the language) and able to use all its features specially ... augmenting objects (any object and especially built-ins) - is also ... is the feature which was specially designed. ... Though, e.g. in Python it's impossible to augment built-ins, but still ...
    (comp.lang.javascript)