4 ms·
It looks awesome! I really like the idé to write once and compile to everything. However I do not have much experience in this field. How does this differ from
by dosshell 11y ago
It looks awesome! I really like the idé to write once and compile to everything. However I do not have much experience in this field. How does this differ from the current popular approaches, example Haxe? When should I use this and when should I use Haxe?
- alehander42 11y agoThank you. The goal of Pseudo is to create idiomatic and readable code in the target language, it should look exactly as a human wrote it in order to be useful for bootstrapping codebases in other languages or maintaining code in several languages(basically for cases when developers would continue working on the generated code) Haxe's output isn't alien or too-machine-translated-like, but it's not optimized for that goal too. Pseudo's intermediate format is `pseudo AST`, and it's supposed to be a target for various tools: compilers, parser generators etc. That would make it even possible to convert between different languages for the same codebase(I don't recommend it, but it can be useful). As far as I am aware, Haxe isn't meant to be a compiler target. Pseudo makes it a lot easier to add support for a new language or a library. It's written in Python and it uses a very declarative/template-like approach: https://github.com/alehander42/pseudo/blob/master/pseudo/generators/csharp_generator.py https://github.com/alehander42/pseudo/blob/master/pseudo/gen... And, according to Haxe docs: > These are the technical skills you must achieve to create a compilation target for Haxe: > ... > Learn Ocaml > Understand Haxe compiler sources It will try to support a lot more languages, including functional languages(it does already support Go and Ruby, which aren't supported byHaxe).
- alehander42 11y agoBeware that Pseudo is still in early stages. If you think you have an use case, I will be happy to discuss it, but it's still unstable and experimental.