Patashu / break_eternity.js

A Javascript numerical library to represent numbers as large as 10^^1e308 and as small as 10^-10^^1e308. Sequel to break_infinity.js, designed for incremental games.
MIT License
121 stars 44 forks source link

Old browser(s) support #114

Open jakub791 opened 2 years ago

jakub791 commented 2 years ago

Currently break_eternity code (except the typescript version) gets transpiled to ES5 (ES2009) compatible syntax, which I assume is done to keep backwards compatibility. But as far as I know, the only browser that dosen't support ES6 (ES2015) is Internet Explorer (and there was an official statement about the fact that it's no longer gonna be supported IIRC). So my question is: do we really need to transpile the code to ES5 compatible syntax?

Patashu commented 2 years ago

I think I do this because break_infinity does this because Antimatter Dimensions tried to support Internet Explorer.

Contingent on a convincing argument that this is no longer necessary then I'm happy for it to be changed. Don't know the pros/cons of this decision right now.

jakub791 commented 2 years ago

You shouldn't even think about Internet Explorer.

Patashu commented 2 years ago

As long as people still use IE11, then surely it's not without value to support it.

jakub791 commented 2 years ago

If they use 10 years old technology they should be aware of consequences.

jakub791 commented 2 years ago

And also: even if you keep supporting IE11, game devs might not do it for the rest of the game code which defeats the point.

jakub791 commented 2 years ago

All games that I know use at least some of ES6 syntax which isn't availabe in IE11

James103 commented 2 years ago

From what I can tell, Microsoft Edge has IE11 compatibility mode; does that limit Javascript to ES5 like in the real IE11? If so, then this may have to wait until IE11 compatibility mode is depreciated near the end of this decade (at the time of writing).

jakub791 commented 2 years ago

Tell me one game that is IE11 compatible.

jakub791 commented 2 years ago

Oh also why is the ESM version of this library transpiled to ES5 syntax? ES modules aren't available in ES5 so.

jakub791 commented 1 year ago

As long as people still use IE11, then surely it's not without value to support it.

well ok, I get you. Still would be nice to have a separate modern build of the library for whose who don't need that - surely such code using native classes would run faster than the more verbose ES5 code.