Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The portions of this book that cover features that are relatively un-changing, s

ID: 646270 • Letter: T

Question

The portions of this book that cover features that are relatively un-changing, such as code evaluation, with statements, and timers are continually being used in interesting ways. There are now a number of active programming languages that are built on top of, or compiled to, JavaScript: Such as CoffeeScript or Processing.js. These languages require complex language parsing, code evaluation, and scope manipulation in order to work effectively. While dynamic code evaluation has been maligned due to its complexity and potential for security issues, without it we would not have had the CoffeeScript programming language

Explanation / Answer

Dynamic code Evaluation means "executing code within code" -- the first 'code' is represented by strings in the second 'code'.

Non-compiled languages provide some way of executing code from within a program. All the steps (parsing, intermediate code generation, optimization, etc.) are executed on the fly for the dynamically processed code.

Dynamic code Evaluation comes in handy specially when you can not write code without some variables that are only available on run-time. See an example in this question.

Another advantage is debugging. You can write custom debuggers that can execute code at a specific break point while the program is on the go.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote