You Don’t Know JS: Types & Grammar by Kyle Simpson

You Don’t Know JS: Types & Grammar by Kyle Simpson

Author:Kyle Simpson [Programming Languages/Javascript]
Language: eng
Format: epub
Publisher: O'Reilly Media, Inc.
Published: 2015-05-17T00:00:00+00:00


Simplifying Implicitly

Before we even get to JavaScript, let me suggest something pseudo-code’ish from some theoretical strongly typed language to illustrate:

SomeType x = SomeType( AnotherType( y ) )

In this example, I have some arbitrary type of value in y that I want to convert to the SomeType type. The problem is, this language can’t go directly from whatever y currently is to SomeType. It needs an intermediate step, where it first converts to AnotherType, and then from AnotherType to SomeType.

Now, what if that language (or definition you could create yourself with the language) did just let you say:



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.