2 ms·
I've basically resigned myself to using JavaScript for new client-side development, since it's the native language of the browser, which is the most restrictive
by mwcampbell 14y ago
I've basically resigned myself to using JavaScript for new client-side development, since it's the native language of the browser, which is the most restrictive of all platforms.
I considered C# a few months ago; I know that things like Script# and JSIL can translate C# or CLI bytecode to JS. But I figured there would be subtle semantic mismatches that would require anyone working with such code to know both C# and JS anyway. So arguably JS requires less working knowledge.
The most obvious semantic mismatch between JS and other mainstream languages is that the other languages usually (if not always) support multiple threads with shared state. Consequently, the standard libraries of these other languages tend to have blocking APIs. This seems to me like a good reason to use JS for new client-side development, rather than trying to make another language compile to JS. One can convincingly argue that not supporting multiple threads with shared state is a good thing, anyway.
The only limitation in JS that really bothers me, if it still even exists, is that AFAIK the largest possible integer is 2^53.
- iso8859-1 14y agoJavaScript still has no integers. But you can use a bignum library. Hopefully you'll get integer level performance if the JavaScript VM sees that you're only doing integer operations (that includes dividing and then coercing an "integer" by using "|0" or similar).