ECMA-262-3 in detail. Chapter 8. Evaluation strategy.

  • Thread starter Dmitry A. Soshnikov
  • Start date
I

Ivan S

Thanks Dmitry.


Very interesting and informing chapter. :)


This part sound confusing to me:

"Moreover, in Python community exactly this terminology — by sharing
is used. As to other languages there alternative terminologies can be
used and which can often confuse as are crossed in the name with other
strategies."

Maybe this could be better translation (if I understood correctly):

"Moreover, in Python's community exactly this terminology — by sharing
is used (is being used, I would say). As for other languages, there
are alternative terminologies that can be used and which can often be
confusing as they are crossed (or, in a contrary) with the name(s) in
other strategies."

....

More fixed translation:

"In Ruby this strategy is named as by reference. Again, on the one
hand — it is passed not a copy of a big structure (i.e., seems, not by
value), but on the other hand, we deal not with the original reference
to object and cannot change it; consequently, this crossing in
terminology again can confuse."

->

"In Ruby, this strategy is named as by reference. Again, on (the) one
hand — it is not passed as a copy of a big structure (i.e., seems, not
by value), but on the other hand, we don't deal with the original
reference to object and cannot change it; consequently, this crossing
in terminology again can be confusing."



"The more precisely this behavior..." -> "More precisely, this
behavior..."




Ivan
 
D

Dmitry A. Soshnikov

Thanks Dmitry.

Very interesting and informing chapter. :)

This part sound confusing to me:

"Moreover, in Python community exactly this terminology — by sharing
is used. As to other languages there alternative terminologies can be
used and which can often confuse as are crossed in the name with other
strategies."

Maybe this could be better translation (if I understood correctly):

"Moreover, in Python's community exactly this terminology — by sharing
is used (is being used, I would say). As for other languages, there
are alternative terminologies that can be used and which can often be
confusing as they are crossed (or, in a contrary) with the name(s) in
other strategies."

...

More fixed translation:

"In Ruby this strategy is named as by reference. Again, on the one
hand — it is passed not a copy of a big structure (i.e., seems, not by
value), but on the other hand, we deal not with the original reference
to object and cannot change it; consequently, this crossing in
terminology again can confuse."

->

"In Ruby, this strategy is named as by reference. Again, on (the) one
hand — it is not passed as a copy of a big structure (i.e., seems, not
by value), but on the other hand, we don't deal with the original
reference to object and cannot change it; consequently, this crossing
in terminology again can be confusing."

"The more precisely this behavior..." -> "More precisely, this
behavior..."

Thanks Ivan; fixed.

Dmitry.
 
T

Thomas 'PointedEars' Lahn

Ivan said:
More fixed translation:

"More fixed" is like "a bit pregnant" ;-)
"In Ruby this strategy is named as by reference. Again, on the one
hand — it is passed not a copy of a big structure (i.e., seems, not by
value), but on the other hand, we deal not with the original reference
to object and cannot change it; consequently, this crossing in
terminology again can confuse."

->

"In Ruby, this strategy is named as by reference. Again, on (the) one

"is named as by reference" is most certainly wrong. Perhaps "is named
'by reference'" (to avoid the ambiguous "is called 'by reference'") was
meant. AFAIK the `the' must be omitted from the first part of the phrase.
hand — it is not passed as a copy of a big structure (i.e., seems, not

The predicate in the parenthesis is lacking a subject ("it"), and the
"i.e." does not seem to fit here.
by value), but on the other hand, we don't deal with the original

Perhaps contractions should not be used in such texts, as it is more often
the case in writing than in speech. You have proposed "it is", not "it's",
so for consistency there should be "do not", not "don't" (except perhaps at
the end of a sentence). Another factor in favor of not using a contraction
here is that (as ISTM) the "not" is emphasized.
reference to object and cannot change it; consequently, this crossing
in terminology again can be confusing."

Either the em dash must be a comma, or both trailing punctuation marks must
be omitted from the phrase. So either:

In Ruby, this strategy is named "by reference". Again, on one hand, it is
not passed as a copy of a big structure (i.e., it seems, not by value),
but on the other hand, we do not deal with the original ...

Or:

In Ruby, this strategy is named "by reference". Again, on one hand
it is not passed as a copy of a big structure (i.e., it seems, not by
value), but on the other hand we do not deal with the original ...

<http://idioms.thefreedictionary.com/on+the+one+hand...on+the+other+hand>
<http://dictionary.cambridge.org/dictionary/british/on-the-one-hand-on-the-
other-hand>

The sentences are still overly long and complicated, which easily and
frequently happens in word-by-word translations (BTDT). One should try to
split them, and avoid the more complicated rhetorical figures, so that they
are better understood. Some commas might need to be omitted, too.

Probably Michael Wojcik, of Rhetoric & Writing at Michigan State
University, who occasionally posts here, can provide further advice.


PointedEars
 
D

Dr J R Stockton

In comp.lang.javascript message <1d30c25a-6919-47de-8212-8f3b1d07ba8d@g3
0g2000yqc.googlegroups.com>, Sat, 10 Apr 2010 12:47:19, Dmitry A.
Soshnikov said:
Inform you about the next translation:

"ECMA-262-3 in detail. Chapter 8. Evaluation strategy."

http://dmitrysoshnikov.com/ecmascript/chapter-8-evaluation-strategy/

"B.Eich" might be better written as "Brendan Eich".

The top & bottom, and perhaps the sides, but not the main text, of your
pages should be checked with Firefox and several steps of Zoom Text
Only. Text sometimes fails to fit in the space provided. Perhaps some
of your layout uses px or pt where pt or ex would be better? A flexible
design should rarely use measurements in px.

For those with narrow windows, a few px or an ex or em of left and right
padding on the body element could help, by making it clearer that there
is no text outside.

Those apply also to the Russian version.
 
I

Ivan S

"More fixed" is like "a bit pregnant" ;-)

:)

Ah, yes. I translated that literaly from my native language and it was
supposed to mean: more translation fixes/corrections.
"is named as by reference" is most certainly wrong.  Perhaps "is named
'by reference'" (to avoid the ambiguous "is called 'by reference'") was
meant.  AFAIK the `the' must be omitted from the first part of the phrase.

Should have been: "is named as 'by reference'". In original text, "by
reference" is italic (as I remember), so I think it was supposed to be
quotation.



Ivan
 
T

Thomas 'PointedEars' Lahn

Ivan said:
Should have been: "is named as 'by reference'". In original text, "by
reference" is italic (as I remember), so I think it was supposed to be
quotation.

I figured as much. However, I am quite certain now that in this context
the "as" does not belong: Something is named something else (in a specific
context), _not_ "as something else". For the "as" changes the meaning:

We named our son Charles, after his uncle.
We name (i.e. call) this amazing property of our software
"supercalifragilisticexpialidociousness".

But:

David Saker has been named as England bowling coach.
M., 17, has been named as the suspect.
Cancer has been named as the cause of her death.

(from a quick Google search)

Cf. <http://dictionary.cambridge.org/dictionary/british/name_2#name_2__3>,
<http://dictionary.cambridge.org/dictionary/british/name_3#name_3__3>,
<http://www.askoxford.com/concise_oed/name?view=uk>


PointedEars
 
I

Ivan S

I figured as much.  However, I am quite certain now that in this context
the "as" does not belong: Something is named something else (in a specific
context), _not_ "as something else".  For the "as" changes the meaning:

  We named our son Charles, after his uncle.
  We name (i.e. call) this amazing property of our software
  "supercalifragilisticexpialidociousness".

But:

  David Saker has been named as England bowling coach.
  M., 17, has been named as the suspect.
  Cancer has been named as the cause of her death.

(from a quick Google search)

Cf. <http://dictionary.cambridge.org/dictionary/british/name_2#name_2__3>,
<http://dictionary.cambridge.org/dictionary/british/name_3#name_3__3>,
<http://www.askoxford.com/concise_oed/name?view=uk>


Yes, I think you have a point, it should have been without "as". :)




Ivan
 
D

Dmitry A. Soshnikov

"More fixed" is like "a bit pregnant" ;-)


"is named as by reference" is most certainly wrong.  Perhaps "is named
'by reference'" (to avoid the ambiguous "is called 'by reference'") was
meant.  AFAIK the `the' must be omitted from the first part of the phrase.


The predicate in the parenthesis is lacking a subject ("it"), and the
"i.e." does not seem to fit here.

Which fits better?
Perhaps contractions should not be used in such texts, as it is more often
the case in writing than in speech.  You have proposed "it is", not "it's",
so for consistency there should be "do not", not "don't" (except perhaps at
the end of a sentence).  Another factor in favor of not using a contraction
here is that (as ISTM) the "not" is emphasized.

Yes, I need to know what is usually used in articles. What way is
better? Not to use contractions? In Russian version I use more-less
academical stylistics without (or decreasing) simple talking language
phrases. So will it be better to write everywhere "do not" instead of
"don't", "let us" instead of "let's" and so on? From the other hand, I
of course, don't want to make the descriptions *too* pedantic; it
isn't my objective.
Either the em dash must be a comma, or both trailing punctuation marks must
be omitted from the phrase.  So either:

  In Ruby, this strategy is named "by reference". Again, on one hand, it is
  not passed as a copy of a big structure (i.e., it seems, not by value),
  but on the other hand, we do not deal with the original ...

Or:

  In Ruby, this strategy is named "by reference".  Again, on one hand
  it is not passed as a copy of a big structure (i.e., it seems, not by
  value), but on the other hand we do not deal with the original ...

Ok, I'll take the last one, thanks.
<http://idioms.thefreedictionary.com/on+the+one+hand...on+the+other+hand>
<http://dictionary.cambridge.org/dictionary/british/on-the-one-hand-on...
other-hand>

The sentences are still overly long and complicated, which easily and
frequently happens in word-by-word translations (BTDT).  One should tryto
split them, and avoid the more complicated rhetorical figures, so that they
are better understood.  Some commas might need to be omitted, too.

Yes, I know this, so that's why articles still open for wording and
stylistics corrections.
Probably Michael Wojcik, of Rhetoric & Writing at Michigan State
University, who occasionally posts here, can provide further advice.

Yeah, he is welcome for help.

Dmitry.
 
D

Dmitry A. Soshnikov

In comp.lang.javascript message <1d30c25a-6919-47de-8212-8f3b1d07ba8d@g3
0g2000yqc.googlegroups.com>, Sat, 10 Apr 2010 12:47:19, Dmitry A.




"B.Eich" might be better written as "Brendan Eich".

Yes, it makes sense; corrected (including in all other chapters).
The top & bottom, and perhaps the sides, but not the main text, of your
pages should be checked with Firefox and several steps of Zoom Text
Only.  Text sometimes fails to fit in the space provided.  Perhaps some
of your layout uses px or pt where pt or ex would be better?  A flexible
design should rarely use measurements in px.

For those with narrow windows, a few px or an ex or em of left and right
padding on the body element could help, by making it clearer that there
is no text outside.

Those apply also to the Russian version.

Ok, I'll check. We already discussed that font seems to you a bit
small. You can also send me a screenshot that I can check it.

Thanks.

Dmitry.
 
G

Garrett Smith

Dmitry said:
Yes, it makes sense; corrected (including in all other chapters).

It also seems odd to surround his name with dashes, as you do:

"JavaScript inventor — Brendan Eich — also notices"

Why the dashes? Why not just:

"JavaScript inventor Brendan Eich also notices"
 
D

Dmitry A. Soshnikov

It also seems odd to surround his name with dashes, as you do:

"JavaScript inventor Brendan Eich also notices"

Why the dashes? Why not just:

"JavaScript inventor Brendan Eich also notices"

It doesn't depend on _his_ name, I would make so with any name ;) It
was just punctuation, to notice who _exactly_ is an inventor of JS.
But, if in English grammar it is incorrect, OK, I've removed dashes.
Thanks, fixed.

Dmitry.
 
D

Dr J R Stockton

In comp.lang.javascript message <[email protected]
september.org>, Mon, 19 Apr 2010 13:03:38, Garrett Smith
It also seems odd to surround his name with dashes, as you do:

"JavaScript inventor — Brendan Eich — also notices"

Why the dashes? Why not just:

"JavaScript inventor Brendan Eich also notices"

That's not how it should really be written.

"The inventor of JavaScript, Brendan Eich. also notices ...".

Good English is reluctant to use nouns as adjectives.

But the dashes are not incorrect.
 
M

Michael Wojcik

Dr said:
That's not how it should really be written.

"The inventor of JavaScript, Brendan Eich. also notices ...".

Good English is reluctant to use nouns as adjectives.

There's no noun being used as an adjective there, with or without the
commas. (I assume you intended a comma after "Eich".) There's just a
proper noun in apposition to the preceding noun phrase.

Omitting commas around a short appositive does not change its
grammatical function (much less its part of speech). That usage is
widespread and widely accepted.

"Good English" is a matter of opinion, there being no
broadly-recognized authority on the subject. Of course there is room
to debate which usages are preferable, on any number of grounds -
tradition, clarity, and aesthetics are popular choices. But I suspect
it would be difficult for anyone to mount a convincing argument that
short appositives should always be set off by commas.
 
D

Dr J R Stockton

Fri said:
There's no noun being used as an adjective there, with or without the
commas. (I assume you intended a comma after "Eich".) There's just a
proper noun in apposition to the preceding noun phrase.

The comment "Good ..." applies to what Dmitry wrote in slavic style, as
quoted by Garrett. What you have quoted there is my English version.
Omitting commas around a short appositive does not change its
grammatical function (much less its part of speech). That usage is
widespread and widely accepted.

"Good English" is a matter of opinion, there being no
broadly-recognized authority on the subject.

The English recognise the wisdom of Professor Henry Higgins <g>.
 
R

Ry Nohryb

Inform you about the next translation:

"ECMA-262-3 in detail. Chapter 8. Evaluation strategy."

http://dmitrysoshnikov.com/ecmascript/chapter-8-evaluation-strategy/

Hi Dmitry,

1.- In the section "General Theory" you could as well say that the
order in which the arguments are evaluated in well specified in ES
(unlike in other languages, notably, C), it is from left to right.
This is of great importance if you happen to code something like this:
foo(a++, a+b);

2.- Pass-by-xxx and call-by-xxx can be used interchangeably. I would
stick to one of them. In the "Introduction" you use the term passed by
but in the sections you use call by. I for one would prefer "pass by"
everywhere as it's used more commonly than "call by", and I find it
more intuitive.

3.- Wrt the behaviour described in "Call by reference", let me tell
you that the behaviour when passing by reference an object in C is
exactly the same as in ECMAScript [*1]. C's behaviour has always been
called pass by reference, even though the reference is passed by
value. E.g. the wikipedia article about this says : "Even among
languages that don't exactly support call-by-reference, many,
including C and ML, support explicit references (objects that refer to
other objects), such as pointers (objects representing the memory
addresses of other objects), and these can be used to effect or
simulate call-by-reference (but with the complication that a
function's caller must explicitly generate the reference to supply as
an argument).". I would add, "and with the complication that the
pointer has to be dereferenced explicitly in order to access the
object".

4.- "Call by sharing" would be the best way to call it, were it not
for the fact that the semantics it describes get different names
depending on where you come from, some call it pass-by-reference and
some call it pass-by-value, because in fact it's both of them at the
same time: it's a "call-by-value, where the value is implied to be a
reference to the object". Exactly what C does, and what we've been
calling to pass by reference for ~ 4 decades.

5.- In "Terminology versions" you say
<quote>
The statement "objects are passed in function by reference" formally
is not related with ECMAScript and is incorrect.
</quote>
It is not anymore incorrect than saying that "in C objects can be
passed by reference" or "in Ruby objects are passed by reference" or
"in Java objects are passed by value, where the value is a reference".


I think that this matter is turning into a kind of holy war. If I were
to write on this matter, I would avoid any attempt to force a
terminology for as you should see there are good reasons for using any
of them, and different people coming from different languages are used
to call it differently, and none of them is wrong.


[*1] If you're interested, I can provide you an example that proves
this point. What you say in "By sharing and pointers" :
<quote>
Regarding ó/ó++, this strategy is ideologically similar to passing by
pointer values, but with one important difference -- that it is
possible to dereference the pointer and to change the object
completely.
</quote>
is wrong. In C, an argument that is a pointer is a copy of a
reference, just as an argument that is a reference in ES. When a
function receives an argument that is a pointer, it can either change
the argument's value alltogether and make it point to somewhere/
something else (in ES that would be the equivalent of assigning a
completely different value to the argument, as in reference= {}, or
reference= "fjh", or reference= 27, or reference= null, or reference=
youNameIt) or touch the contents of the object that the pointer points
to using a dereferencing operator, either pointer->property= value or
(*pointer).property= value, exactly as you'd do in ES, the only
difference being that in ES there's no need to dereference explicitly:
reference.property= value would do. There's *nothing* that can be done
in C when passing an object by reference (as in f(&object) ), that
can't be done in ES. Their behaviours are identical. And again. This
behaviour has been called "to pass by reference" for decades.
 
D

Dmitry A. Soshnikov

On Apr 24, 9:09 pm, Dr J R Stockton <[email protected]>
wrote:

The comment "Good ..." applies to what Dmitry wrote in slavic style, as
quoted by Garrett.

Yep, this is my brand-style :p But seriously, yes, unfortunately, I
still have some problems with Russian stylistic when forming English
sentences. That exactly I mention that everyone is welcome for such
corrections. Because it is important in such articles.

Dmitry.
 
D

Dmitry A. Soshnikov

Dr J R Stockton wrote:






There's no noun being used as an adjective there, with or without the
commas. (I assume you intended a comma after "Eich".) There's just a
proper noun in apposition to the preceding noun phrase.

Omitting commas around a short appositive does not change its
grammatical function (much less its part of speech). That usage is
widespread and widely accepted.

"Good English" is a matter of opinion, there being no
broadly-recognized authority on the subject. Of course there is room
to debate which usages are preferable, on any number of grounds -
tradition, clarity, and aesthetics are popular choices. But I suspect
it would be difficult for anyone to mount a convincing argument that
short appositives should always be set off by commas.

Thanks, it is also interesting.

Dmitry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top