I agree lower ALL the cases is a win ... also because `boolean`, `string`, and `object`, aren't reserved words while function obviously is so with current proposal where `object` means `function` too and `any` includes null there's nothing ambiguous and less to bother about references.
On Wed, Aug 21, 2013 at 5:02 PM, David Herman <[email protected]> wrote: > On Aug 21, 2013, at 2:36 PM, Brendan Eich <[email protected]> wrote: > > > David Herman wrote: > >> Any, String and Object should still be uppercase. The naming convention > is: value types lowercase, reference types uppercase. > > > > Is String really a reference type? Currently you can't tell, and JS docs > and books don't (AFAIK) say "reference type" apart from object (not null; > including function). String also happens to spell the constructor/converter > function, which sadly both returns a primitive and creates a String object > depending on how it is called. > > You can tell, in that a type that includes String must be opaque. The > might-be-a-pointer property of a type is observable in the typed objects > API in that it cannot expose its backing storage as an ArrayBuffer. Strings > necessarily might-be-a-pointer. > > I take your point that it's confusing on the primitive/object axis, though. > > So... all right, let's break out those paintbrushes. Let's say we use the > lowercase naming convention for purely immutable types, independent of > whether they might-be-a-pointer. This still leaves Dmitry's question about > the unfortunate name collision -- even though modules make this "okay," > it's still a PITA in practice not to be able to import Object without > shadowing the built-in Object. > > Personally I'd be fine with just lowercasing all the things. Brendan, you > cared about using capitalization for object types, though. What color is > your bikeshed? > > Dave > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

