0
Compiler vs Interpreter...
Whichs is better, a compiler or interpreter??? Why?? Which languages do you know use interpreter and compiler??
4 Respostas
+ 7
None is better than the other. Whether a language is compiled or interpreted is inherent to the respective programming language.
No programming language is better or best. Programming languages are tools. How useful they are for solving a task depends on the task itself, the context, your experience.
+ 4
Short version:
https://www.freecodecamp.org/news/compiled-versus-interpreted-languages
Long version:
https://en.m.wikipedia.org/wiki/Compiled_language
https://en.m.wikipedia.org/wiki/Interpreter_(computing)
And also, the boundaries are not as clear as they seem.
Javascript is an interpreted language, but modern web frameworks such as Svelte often use compilation to optimize the code before it is executed.
Python is also an interpreted language but CPython pre-compiles your script to an intermediate bytecode, before execution.
And some traditionally compiled languages like Java have new scripting features which allow you to run source code directly from command line (jshell) without compiling first.
+ 1
Compiled indeed, the machine can understand your program directly