Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #30096

Re: Can somebody explain this code

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Can somebody explain this code
Date 2016-03-24 04:20 +0100
Organization PointedEars Software (PES)
Message-ID <3102164.rQk1h68GbR@PointedEars.de> (permalink)
References <ncv2un$mlp$1@dont-email.me> <ncv9sp$9b2$1@softins.softins.co.uk> <pointer-20160324013939@ram.dialup.fu-berlin.de>

Show all headers | View raw


Stefan Ram wrote:

> tony@mountifield.org (Tony Mountifield) writes:
>>The expression (a && b) returns a if a is not truthy, but returns b if a
>>is truthy. In this case a and b are pointers to functions, which are
>>always truthy. So (a && b) has the value b, which is then called by virtue
>>of the following ().
> 
>   I have just searched the ECMAScript Standard for uses of the
>   word »pointer«. Found none. That makes me think about the
>   meaning of the above expression »pointers to functions«.

There are no pointers to functions.  Proper terminology includes: “reference 
to a Function instance”, “reference to a function object”, and “reference to 
a function”.  Also, “truthy” is ambiguous [1], and “falsy” is not a proper 
English word in this sense [2]; I prefer to use “true-value” and “false-
value” instead to mean values that, if passed to the ToBoolean algorithm, 
would result in “true” and “false”, respectively.

BTW, in English it is unusual to use guillemets for quotation marks. [3]

Likewise, when discussing ECMAScript one would indent the source code 
instead of the prose.  You must have realized by now that you are the only 
one in Usenet doing the latter, making discussions in which you participated 
*harder* to read.

[1] 
<http://www.oxforddictionaries.com/definition/english/truthy?searchDictCode=all>
[2] 
<http://www.oxforddictionaries.com/definition/english/falsies?q=falsy&searchDictCode=all>
[3] <https://en.wikipedia.org/wiki/Quotation_marks_in_English>

-- 
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.

Back to comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Can somebody explain this code tony@mountifield.org (Tony Mountifield) - 2016-03-23 23:46 +0000
  Re: Can somebody explain this code Aleksandro <aleksandro@gmx.com> - 2016-03-23 23:58 -0300
  Re: Can somebody explain this code Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-24 04:20 +0100
    Re: Can somebody explain this code "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-24 11:23 +0100
      Re: Can somebody explain this code Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-24 20:32 +0100
    Re: Can somebody explain this code John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-24 11:22 +0000

csiph-web