Open oleorhagen opened 6 years ago
Definitely. Yet there is a critical bug ( #14 ) that MUST be fixed. After that, x.py
SHOULD by semantically identical to bython -c (py2by x.py)
. Then we can initiate transpilation (and manual minor modification) from src/*.py
to src/*.by
.
There are a couple of real advantages of relying on regular python for parsing, these include:
-c
flag and run with your interpreter of choice. Bython was simply meant as a translator from curly braces to indentation, and I think it's best to keep it like that and use other software for the interpreting.
@mathialo Basically, bootstrapping
here (in my opinion) means:
(here bython is a language just like C, while Bython
is a bython-to-python compiler just like GCC)
Bython
transpiler itself (source code) should be written in bython, not python because bython is much better as a language;Bython
is to be released, we impose an older version of Bython
on the source code to obtain python binaries (yeah python IS human-readable, but not SO readable as bython 😏 );Bython
can simply download the binaries, copy them to /usr/local/bin, run bython -c
, ...Concept | In Bython v0.x | In Bython v1.x | In GCC |
---|---|---|---|
High-level language | bython | bython | C |
Compiler | Bython | Bython | GCC |
Low-level language | python | python | machine code |
Compiler source code is written in | python | bython | C |
Does compiler need compilation | No | Yes | Yes |
Compiler binary is in | python | python | machine code |
Ah, I see, I misunderstood. Of course, I think that should be a goal. I also agree on your table above that we keep Bython 0.x written in Python for now, but it should be written in Bython and compiled to Python as of version 1.0 (whenever that may be).
Bython should be able to parse itself, and not rely on filthy regular python in doing so!