I'm sorry, I missed that suggestion.

That definitely sounds significantly better than a new MIME type.  Although two 
thoughts I have are:

 - How are you going to deal with scenarios that don't have extensions, e.g. 
REPL or inline JS.

 - Are extensions going to be released often, or is this going to be a one time 
thing?  For example, would we increment the version number with the current JS 
version (js6, js7 etc) and if so, would it make more sense to start on js7 
instead of js2?
On 25/07/2017 20:41:33, doodad-js Admin <[email protected]> wrote:
*  1. In terms of including it in <script> tags, I don't think that is a good 
idea for including third party libraries in your code.  It would be hard to 
tell what version of JavaScript a library is using, I think it would be better 
to allow it to be defined by the library, instead of the user.
 
That’s why I’ve suggested a new file extension (js2).
 
*  2. In response to "server can set MIME type", a lot of libraries are hosted 
on systems that don't allow you to change headers, for example Github pages.  
Plus, there are several JavaScript CDNs out there that also don't let you set 
MIME type.
 
I’m talking about the “Accept” header, which is set by the client on each 
request. Browsers that support JS 2 will automatically append 
“application/javascript.2” to that header.
 
* 3. Not many newer individuals know how to set headers, I don't think I'd be 
able to set headers on Apache off the top of my head. 
 
That’s the base of Web development, but not required on that situation.
 
 
From: Alexander Craggs [mailto:[email protected] 
[mailto:[email protected]]]
Sent: Tuesday, July 25, 2017 3:16 PM
To: Sebastian Zartner <[email protected] 
[mailto:[email protected]]>; Naveen Chawla <[email protected] 
[mailto:[email protected]]>
Cc: [email protected] [mailto:[email protected]]
Subject: Re: Removal of language features
 
Some thoughts on using MIME types to distinguish between versions:
 
 
May be biased, suggested a separate method of versioning with the "use es8" 
deceleration at the top of a file.  As a side note, since I made the other 
thread that seems to be discussing almost the exact same topic as this one 
(versioning to add breaking changes vs. versioning to remove language 
features), do people think it would be a good idea to discuss both thoughts 
solely in this thread (the more popular one?).  
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to