From: Thomas 'PointedEars' Lahn on 24 Mar 2010 17:44 Garrett Smith wrote: > Thomas 'PointedEars' Lahn wrote: >> Richard Cornford wrote: >>> On Mar 24, 3:01 pm, Thomas 'PointedEars' Lahn wrote: >>>> Richard Cornford wrote: >>>>> On Mar 24, 9:52 am, Thomas 'PointedEars' Lahn wrote: > [...] >>>> IIUC you are implying that the following statement would make sense: >>>> >>>> "A host object can be an object in an ECMAScript implementation [...] >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >>> No. The whole point of host objects is that they are not provided by >>> an ECMAScript implementation, and so could never be described as being >>> "in an ECMAScript implementation". >> >> Very good. However, as you can see above, I have only applied the >> existing definitions in ECMAScript Edition 5 *verbatim* to your >> assumption that a host object could be a native one. >> > The specification does not forbid the host environment from implementing > host objects as native objects. However, logic dictates that a host object cannot be a native object. Take the definitions for "host object" and "native object" and apply them to Richard's assumption and you can see at least one contradiction. > That is a fact, not an assumption. You need to define what "implement as native object" means first for this statement to have a chance to be true. In doing so you should consider *all* that has been said, and not only the parts that you like to quote. PointedEars -- var bugRiddenCrashPronePieceOfJunk = ( navigator.userAgent.indexOf('MSIE 5') != -1 && navigator.userAgent.indexOf('Mac') != -1 ) // Plone, register_function.js:16
From: Garrett Smith on 27 Mar 2010 18:58 Dr J R Stockton wrote: > In comp.lang.javascript message <addjA5I9A9pLFwMT(a)J.A830F0FF37FB96852AD0 > 8924D9443D28E23ED5CD>, Mon, 22 Mar 2010 20:17:01, John G Harris > <john(a)nospam.demon.co.uk> posted: >> On Sun, 21 Mar 2010 at 13:29:22, in comp.lang.javascript, Peter Michaux >> wrote: > >> <snip> >>> I think this FAQ entry should be removed. >> I disagree. >> >> <FAQENTRY> >> That said, I think this FAQ topic could do with one or two extra >> sentences at the front saying what an Object Model is. The current text >> says what it is not, and what it allows you to do, but no more. > > Agreed. > Defining "host object" is important because host objects, especially in IE, are the source of problems in scripts. There is value in explaining this because without such knowledge, the developer only knows that the value type is "object", but cannot understand why it doesn't behave as other objects. > The copious posters here are extremely ready to argue interminably about > points of fine detail which are of marginal interest to those for whom > the FAQ was written and for whom a FAQ should still be intended. > A clear differentiation of "host object" and "built-in" object was revealed. Based on the comments, I propose the following replacement: | What is a host object? | | A host object is an object supplied by the host environment to | complete the execution environment of ECMAScript. | | A host object is not part of the ECMAScript implementation, but is | exposed to the ECMAScript implementation. | | A host object may be implemented as a native ECMAScript object, | however this is not required. For example, Internet Explorer, | implements many scriptable DOM objects as ActiveX Objects, often | resulting in unexpected errors. | | * /faq/notes/code-guidelines/#hostObjects Thoughts and suggestions? -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Dr J R Stockton on 28 Mar 2010 10:38 In comp.lang.javascript message <hom2ie$d3a$1(a)news.eternal- september.org>, Sat, 27 Mar 2010 14:58:20, Garrett Smith <dhtmlkitchen(a)gmail.com> posted: >Dr J R Stockton wrote: >> The copious posters here are extremely ready to argue interminably about >> points of fine detail which are of marginal interest to those for whom >> the FAQ was written and for whom a FAQ should still be intended. >> > >A clear differentiation of "host object" and "built-in" object was revealed. But is that useful to those for whom the FAQ is should be intended? I think not. That sort of esoteric discussion should be elsewhere. >Based on the comments, I propose the following replacement: > >| What is a host object? >| >| A host object is an object supplied by the host environment to >| complete the execution environment of ECMAScript. No. That sentence would only be correct about the LAST host object, without which there is no completion. Change to "Host Objects are ...". And, since more than one host environment is possible, better to use "a host environment" or "host environments". >| A host object is not part of the ECMAScript implementation, but is Host Objects are not defined by the ECMA/ISO standards, but are // ? >| exposed to the ECMAScript implementation. >Thoughts and suggestions? If Host Objects are different from "built-in objects", and if the latter exist in context, the latter should also be described. -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links; Astro stuff via astron-1.htm, gravity0.htm ; quotings.htm, pascal.htm, etc. No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
From: Garrett Smith on 28 Mar 2010 19:52 Dr J R Stockton wrote: > In comp.lang.javascript message <hom2ie$d3a$1(a)news.eternal- > september.org>, Sat, 27 Mar 2010 14:58:20, Garrett Smith > <dhtmlkitchen(a)gmail.com> posted: >> Dr J R Stockton wrote: > >>> The copious posters here are extremely ready to argue interminably about >>> points of fine detail which are of marginal interest to those for whom >>> the FAQ was written and for whom a FAQ should still be intended. >>> >> A clear differentiation of "host object" and "built-in" object was revealed. > > But is that useful to those for whom the FAQ is should be intended? I > think not. That sort of esoteric discussion should be elsewhere. > The discussion was not included in the FAQ; the important points revealed therein were. > >> Based on the comments, I propose the following replacement: >> >> | What is a host object? >> | >> | A host object is an object supplied by the host environment to >> | complete the execution environment of ECMAScript. > Should be "any object supplied". > No. That sentence would only be correct about the LAST host object, > without which there is no completion. Change to "Host Objects are ...". > I do not see the plurality improvement. It does not disambiguate anything. I prefer to use what is written in the specification: | A host object is any object supplied by the host environment to | complete the execution environment of ECMAScript. This statement means that, given a host object, that that object was supplied by the host environment. I do not know what you meant by "the LAST host object." Regaring your proposal to use plural "host objects", there is potential for the plurality to be misinterpreted as "[some] host objects" and so if plurality is used, it should probably be explicit that "All host objects..." or "Every host object..." What is written in the specification is correct. Why not use that? > And, since more than one host environment is possible, better to use "a > host environment" or "host environments". > "the host environment" is omitting the obvious "[that the program is running in]". The alternative, as you would have it: Host objects are supplied by a host environment to complete the execution environment of ECMAScript. Is that right? > >> | A host object is not part of the ECMAScript implementation, but is > Host Objects are not defined by the ECMA/ISO standards, but are // ? > What is "//"? Saying that host objects are not defined by the ECMA/ISO standards is correct, but that is overly broad. It goes without saying that if this statement is true: | A host object is not part of the ECMAScript implementation. - then it is also true that a host object is not defined by ECMA-262. All of the objects defined by ECMA-262 are part of an ECMAScript implementation. That may seem like something to take for granted (seems obvious) but it is actually explicitly stated in the section on "Conformance". However, to say that all of the objects defined by ECMA-262 are part of an ECMAScript implementation does not imply that all objects that are part of an ECMAScript implementation are defined by ECMA-262. Such conclusion would be making the logical error of affirming the consequent. In fact, an ECMAScript implementation may have things that are not defined by the ECMA-262 specification. If an ECMAScript implementation defines something, it is part of that ECMAScript implementation. If something is part of an ECMAScript implemetnation, then it cannot be a host object (because any host object is defined by the host environment). Stating that host objects are not defined by the ECMA/ISO standards is too broad. In comparison, stating that ECMA specs do not define a host object isless precise than state that a host object is not part of the ECMAScript implementation. It would more complete to add that a host object is defined by the host environment, but that was already stated in the first paragraph, so would be redundant at this point. Going back to my proposed text, the first paragraph should change from "an" to "any". Any other suggestions? >> | exposed to the ECMAScript implementation. > >> Thoughts and suggestions? > > If Host Objects are different from "built-in objects", and if the latter > exist in context, the latter should also be described. > I agree with that. It might be a good idea to move both of those to a new section titled "Objects". We have a section each for Dates, Numbers, Functions (finally), and {Strings and RegExp}. This is looking more and more like glossary material. -- Garrett comp.lang.javascript FAQ: http://jibbering.com/faq/
From: Dr J R Stockton on 30 Mar 2010 13:43
In comp.lang.javascript message <hooq3f$3t2$1(a)news.eternal- september.org>, Sun, 28 Mar 2010 15:52:11, Garrett Smith <dhtmlkitchen(a)gmail.com> posted: >What is "//"? ISO/IEC 16262 Section 7.4 - a comment indicator. -- (c) John Stockton, nr London UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME. Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links. Proper <= 4-line sig. separator as above, a line exactly "-- " (RFCs 5536/7) Do not Mail News to me. Before a reply, quote with ">" or "> " (RFCs 5536/7) |