4 ms·
A different kind of fragmentation from the current "use stricter+types";? Assuming type annotations: use-directive: Works only in supported browsers. Causes s
by nothrabannosir 12y ago
A different kind of fragmentation from the current "use stricter+types";?
Assuming type annotations:
use-directive: Works only in supported browsers. Causes syntax errors in unsupported browsers/clients. Requires fallbacks to prevent those from loading it, and to serve non-type-annotated version.
custom mime type: Works only in supported browsers. Causes no issues in unsupported browsers/clients. Requires fallbacks to serve non-type-annotated version. Compatible with past, current and future web standards.
I must be missing something because I can't see how a use-directive for a non-backwards compatible syntax is any improvement over a custom mime type.
Do you have any ideas?
EDIT: Clarification: plenty "alternative scripts" already follow the <script type=...> route. Typescript, coffeescript, &c. They have plugins which scan your page for those tags and automatically compile & eval them. This is not a new idea.