Hacker News new | ask | show | jobs
by vtereshkov 1470 days ago
Of course, any program can be written completely in C. This, however, does not mean that it's always the best way to write programs.

Suppose you have a piece of code that you have to modify frequently until you find an acceptable solution to your problem. For example, it may be a game character behavior, or automatic vehicle control equations, or something else. If you write this piece of code in C, you have to recompile this module and link the whole project each time you modify the source. With a scripting language, you can write 90% of your code in C, and remaining 10% in this scripting language, so that you compile your C project only once. You can even hand over writing the remaining 10% to the people who are not familiar with low-level programming in C but perfectly understand the problem domain (like engineers or game designers).

Another scenario is when you want your application to be customizable by its users, but only in a controlled way and without exposing the sources.