News for hackers. Stuff that matters.
Re:Haxe 4.2 by joppy on Tuesday February 09, 2021 @05:32PM (#26083324)
I have not used Haxe, but looked over at it while writing Typescript - one thing I noticed were macros, which could make writing high-performance Typescript/javascript much more bearable. For example iterator protocols in JavaScript almost necessarily allocate memory (especially for user-defined types), but manually writing a for loop does not (but is a bunch of copypasta for a complex data structure).
Re:Haxe 4.2 by Gama11 on Tuesday February 09, 2021 @06:09PM (#26083748)
Haxe macros are very powerful, but not needed for that particular issue - the compiler supports inlining of methods and even constructors (which is useful for iterators in particular): https://haxe.org/manual/lf-inline-constructor.html