News for hackers. Stuff that matters.
Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by Macha on Thursday August 06, 2020 @08:08AM (#24070202)
So what happens when you need to deal with java.time and Joda Time in the same class (e.g. because Joda was part of your public API but you're migrating to Java time). Fully qualified names everywhere, when it would be nicer to have a construct like:

import org.joda.time.Instant as JodaInstant;

The rest of the weirdness is to make it look like JS destructuring

Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by cel1ne on Thursday August 06, 2020 @10:23AM (#24071123)
Version the API and switch to Java-time everywhere. Or forward everything to another class.
Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by Macha on Thursday August 06, 2020 @10:52AM (#24071421)
Unless you're going to duplicate the logic too, you're still going to have the facade class providing the legacy Joda API that also needs to use the new types to forward onto the new API.

That class doing that transformation will need to refer to both the Joda and java.time class.

Re:Node Modules at War: Why CommonJS and ES Modules Can’t Ge... by Serow225 on Thursday August 06, 2020 @12:21PM (#24072416)
C# has exactly that FWIW: using foo.lib = libfoo