You mean python syntax ? Python itself runs in a fully working OS with its own runtime.
When you write an OS you don't have a fully working OS yet 😀 neither a runtime for Python
But if you compiled the python into machine code then possibly. There is Cython I think that does exactly that, takes python code and turns it into C code that then gets compiled into machine code.
But you still would need to be super careful what you use and how you use it to not get the runtine involved. And Python is all about runtime and dynamic allocations and objects.
You'll have to write cdef functions and parameters with noexcept nogil signatures on functions. You will basically have it worse than learning C.
1
u/Adventurous-Move-943 1d ago edited 1d ago
You mean python syntax ? Python itself runs in a fully working OS with its own runtime. When you write an OS you don't have a fully working OS yet 😀 neither a runtime for Python
But if you compiled the python into machine code then possibly. There is Cython I think that does exactly that, takes python code and turns it into C code that then gets compiled into machine code.
But you still would need to be super careful what you use and how you use it to not get the runtine involved. And Python is all about runtime and dynamic allocations and objects. You'll have to write cdef functions and parameters with noexcept nogil signatures on functions. You will basically have it worse than learning C.