Sorry for bringing this up again, but I’m still having trouble with naming
things properly in JavaScript.
- What do you call something that produces instances in JavaScript? A class? A
type? A constructor? Or is a constructor the implementation of a type?
- Are Date and RegExp built-in types? W
Ah, now I see the impetus for your other question (that's what I get for
reading out of order).
I've had some similar questions recently and found myself deep in the rabbit
hole of type theory...and I still don't have a crystal clear answer
understanding. I'll take a swing below but take with an a
On Sun, Oct 23, 2011 at 3:07 AM, Axel Rauschmayer wrote:
>
> - What do you call something that produces instances in JavaScript? A
> class? A type? A constructor? Or is a constructor the implementation of a
> type?
>
At least in my part of the everyday life of a JavaScript programmer, we call
fun
> - What do you call something that produces instances in JavaScript? A class?
> A type? A constructor? Or is a constructor the implementation of a type?
>
> At least in my part of the everyday life of a JavaScript programmer, we call
> functions that we invoke with "new" mostly "classes" and s
> - What about primitives?Are there primitive types and object types? Is the
> union of the two called just “types”?
>
> That seems to be how a lot of folks refer to them, but I think it's a little
> confusing. A primitive type is one that cannot be decomposed any further, so
> Object is a pri
On Sun, Oct 23, 2011 at 12:01 PM, Axel Rauschmayer wrote:
> - What about primitives?Are there primitive types and object types? Is the
>> union of the two called just “types”?
>>
>
> That seems to be how a lot of folks refer to them, but I think it's a
> little confusing. A primitive type is one
On 23.10.2011 10:07, Axel Rauschmayer wrote:
Sorry for bringing this up again, but I’m still having trouble with
naming things properly in JavaScript.
- What do you call something that produces instances in JavaScript? A
class? A type? A constructor? Or is a constructor the implementation
of
> Almost: a primitive is something that isn’t handled by reference.
>
> Is that from the spec? My interpretation of "primitive" is from ISO/IEC 11404
> (a surprisingly good read for a spec about types!): primitive datatypes are
> "defined axiomatically without reference to other datatypes" and g
Most of the answers below are direct quotes from ES 5.1
> - What do you call something that produces instances in JavaScript? A
> class? A type? A constructor? Or is a constructor the implementation of a
> type?
>
A constructor. http://es5.github.com/#x4.3
>
> - Are Date and RegExp built-in ty
Thanks for your thorough answer!
>> - If instance factory B inherits from instance factory A, is B a subclass of
>> A? B a subtype of A? B a subconstructor of A?
>
> Your assumption points that you very likely mostly programed before in static
> systems (such as Java, etc). Please refer this in
On Sun, Oct 23, 2011 at 11:11 AM, Axel Rauschmayer wrote:
>
> - instanceof: use for objects.
>>
>
> It's *usable* on objects, but not all that *useful*, even with natives
> like Array (they could have come from another frame). This is my biggest
> problem with javascript's nominative types. Duckt
> - What about primitives?Are there primitive types and object types? Is the
> union of the two called just “types”?
>
> A member of one of the types Undefined, Null, Boolean, Number, or String
> http://es5.github.com/#x4.3.2
> Everything else is an object.
Yes that is probably the most elegant
On Sun, Oct 23, 2011 at 11:24 AM, Axel Rauschmayer wrote:
>
> - If instance factory B inherits from instance factory A, is B a subclass
>> of A? B a subtype of A? B a subconstructor of A?
>>
>
> B inherits A's prototype, A is in B's "prototype chain"
>
>
> B.prototype inherits A.protoype.
> A.pro
>> - If instance factory B inherits from instance factory A, is B a subclass of
>> A? B a subtype of A? B a subconstructor of A?
>>
>> B inherits A's prototype, A is in B's "prototype chain"
>
> B.prototype inherits A.protoype.
> A.prototype is a prototype of B. prototype (ugh).
>
> This kind o
I believe the community just says A inherits B even thought they mean that
A.prototype.[[Prototype]] == B.prototype.
On Oct 23, 2011 7:24 PM, "Axel Rauschmayer" wrote:
>> - What about primitives?Are there primitive types and object types? Is
the union of the two calle...
Yes that is probably the
Does no one read RPG's fine Clause 3 of ECMA-262 these days?
/be
On Oct 23, 2011, at 8:48 AM, Axel Rauschmayer wrote:
>> - What do you call something that produces instances in JavaScript? A class?
>> A type? A constructor? Or is a constructor the implementation of a type?
>>
>> At least in
Can you elaborate? It seems like a cultural reference, but I don’t get it.
On Oct 24, 2011, at 0:18 , Brendan Eich wrote:
> Does no one read RPG's fine Clause 3 of ECMA-262 these days?
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
On Oct 23, 2011, at 3:27 PM, Axel Rauschmayer wrote:
> Can you elaborate? It seems like a cultural reference, but I don’t get it.
>
> On Oct 24, 2011, at 0:18 , Brendan Eich wrote:
>
>> Does no one read RPG's fine Clause 3 of ECMA-262 these days?
Sorry, Clause 4. That's "Section 4" or "Chapter
Chapter 8 defines what the ecma-262 spec means by "type".
Sent from Samsung tablet___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
19 matches
Mail list logo