Do Anonymous Exports Solve the Backwards Compatibility Problem?
rossberg at google.com
Wed Dec 19 12:59:28 PST 2012
On 19 December 2012 21:29, James Burke <jrburke at gmail.com> wrote:
> This is illustrated by an example from Dave Herman, for a language
> (sorry I do not recall which), where developers ended up using "_t",
> or some convention like that, to indicate a single export value that
> they did not want to name. As I recall, that language had something
> more like "bindings" than "variables". That would be ugly to see a
> "_t" convention in JS (IMO).
That language would be ML (or its Ocaml dialect), which happens to have the
most advanced module system of all languages by far. The convention is to
use "t" as an internal type name, and I've never heard anybody complain
about it. ;) It's an acquired taste, I suppose.
It's also worth noting that Dave's comparison is somewhat inaccurate. The
convention is used to name the _primary_ abstract type defined by a module,
not the _only_ export -- modules with only one export practically _never_
show up in ML programming, which perhaps is a relevant data point in itself.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss