Hacker News new | ask | show | jobs
by ahauxuueei 3042 days ago
How is this different to haxe? https://haxe.org/
1 comments

I started to write a comparison page here, but missing a lot of important aspects: https://github.com/koczkatamas/onelang/wiki/OneLang-vs.-Haxe...

Tl;dr: you cannot use One in production now, but the grand plan is to make One as hackable and flexible as I can.

So here is the plan:

- the compiler does not contain any target language-specific part, you can add a new language by creating a few hundred lines of template file (this actually works already, it is not just a plan)

- rewrite One in One, so you can convert from any language to any language in any language

- there is no StdLib, but libraries can be created by anyone. We publish interface and implementation definition separately, and you can eg. implement a Web client interface for PHP and Node, while somebody else can implement it for C# and Swift. Behaviour defined by interface tests, if your implementation passes interface test => good. If there is no test for an edge-case => undefined behaviour. Read more here: https://github.com/koczkatamas/onelang/issues/9

- you write a library in One and it helps you to publish to every language's package manager (npm, pip, NuGet, etc). You can reach much more developer with your library compared to targeting only one lang's developer base

This idea has been ronning around in my head, paired with a mining and crypto element.

The language specific implementations of those interfaces could be mined(by hand or automated) for coins to directly incentivise engineering effort. The block acceptance would be based on the universal tests/benchmarks passing.