News for hackers. Stuff that matters.
Re:The not so hidden cost of sharing code between iOS and An... by roel_v on Thursday August 15, 2019 @02:36AM (#20703084)
Years ago I wrote a programming language a bit like Haxe, except that it let you 'inject' snippets of your target language wherever you wanted. So you could keep your major architecture in one common language and still implement specific cases on the spot (ie you don't have to go to other files, and the various implementations for different target languages were right next to each other, making it easier to keep them in sync).

I implemented targets for JS, php and C++. It worked okayish but in the end it was more work to maintain the separate language than just write everything 3 times with some help of a simple macro/template language. I still sometimes wonder if the concept would be developed further, with a proper team and good tooling etc, if it would be a practical way of doing large scale cross platform software development.

Re:The not so hidden cost of sharing code between iOS and An... by tkp on Saturday August 24, 2019 @12:20PM (#20788009)
> a bit like Haxe, except that it let you 'inject' snippets of your target language wherever you wanted.

If I understand you correctly, this feature is available in Haxe : https://haxe.org/manual/target-syntax.html

It targets js, php, C++, has a proper team and good tooling.. so you might be interested in giving it a try.