Message from C, C++ talks

June 2019

— Can anyone explain point 3?

— You can’t run the same compiled c stuff on a different platform without recompilation

— Well the C you can execute immediately, unlike Python which you have to first interpret and then execute

Message permanent page

— Because you have a binary


C compiles to platform dependent code, the compiler creates an exe. If you're on Windows or you'll get an .out if you're compiling on Linux, you can't just take your executable from Windows and run it on Linux, you need to recompile the source code on Linux platform or you can use any cross compiler to compile a binary for Linux. Java is compiled to bytecode and JVM handles (interprets) bytecode, have you ever wondered why you need jre (Java runtime environment) in your system to use Java? And you don't need anything except an executable or any library files if you have compiled binary. You need JVM binary to interpret Java bytecode. But you don't need anything like a JVM to execute compiled c binary and no layer of abstraction. Did you know python interpreter is written in C?

— Tho technically there are C interpreters too

— Can c be used for scripting?

— Yeah

— Ansi c is used for glsl shaders/scripts

— Oh yeah got it. Thanks

— It's C/C++

— Not Java and friends

— Oh it clears all thanks 😁

— Ansi c?

— 🤨