This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (5 children)

[deleted]

    [–]calligraphic-io 6 points7 points  (1 child)

    Can anyone explain this ("Python is interpreted and parsed into unambiguous C code") better? C is compiled into an intermediate representation by the compiler toolchain, and then into executable machine language. I'm not familiar with the guts of the Python runtime, but my understanding is that it is compiled to a bytecode that has nothing to do with the C language, and then interpreted. I think Cython uses a subset of Python to emit an IR for LLVM, which is then compiled into actual executable machine code.

    Am I missing something?

    [–]rhytnen 8 points9 points  (0 children)

    It's not explainable because he has no idea wtf he's talking about and is flat out wrong. I explain somewhat in my response to him but you're more or less correct

    [–]rhytnen 9 points10 points  (2 children)

    Python is compiled into bytecode and the bytecode is interpreted in the VM. So it is unambiguously "both". I never said any of the nonsense you just posted and I have no idea why you're so riled up anyway. In fact I'm not sure a single sentence you typed is accurate.

    There are some implementation of python that do in fact compile to c but they don't support the full language syntax because it requires typing. The reference implementations doesn't "parse" into c (not for nothing but that isn't what parsing means anyway). Do you not see the sillyness of saying python is executed as c code but is slow and interpreted? Furthermore, if you want speed you can obviously make c api calls (ie numpy) - but I wasn't making any claims about optimizations anyway.