Discord
Login
Community
DARK THEME

Interpreted vs Compiled? Object vs Class? What's best?

Depends on your application. For Game Engines?

Interpreted vs Compiled

Compilation is considered faster execution. You have better access to graphics libraries, hardware acceleration. But development is slower, but a good IDE and fast machine can overcome that. Compiled languages tend to stricter, more complex with steeper learning curve. The languages have been around a while and may have grown feature-rich over time, think C++. To do some things in a compiled language, complexity is necessary.

Interpreted languages today aren't necessary slower, with just-in-time compilation. They have clear programming conveniences/advantages over compiled: variables can be type-less, declared on usage, have easy visibility, hold any value/object/function of variables. There can be high-level procedural abstractions. Yet this ease can cause problems on large projects. Without the restriction of declaring in advance with types, clarity may suffer. Trying to determine where you introduced a variable, global or local, and what it's allowed to hold, can be hard with code you wrote before. You code may get mysterious

Is there languages which can be either interpreted or compiled? Yes. Google Dart is one.

Object vs Class

In the beginning, there was Smalltalk, Objects, and Alan Kay. Everything in the language is an object. But it really only works in an interpreter. Objects are higher level things, they don't fit well into a fixed amount of memory which is what a compiler wants to work with. So compiled languages use classes, as they are predefined as to storage space. Classes have their advantages, and inheritance is a good thing. Still you can do anything with Objects you can do with Class, but not visa-versa.

Conclusion

It's faster to develop games, and game engines as well, in a interpreted language with a feature-rich environment such as we have with microStudio. But if you plan a big, complex project you might keep in mind that at some point, you might want to port it to a stricter compiled language. So write good code.

Well you kinda answered the question already

But if you want a language that is easy to use for faster development and prototyping and code that changes can be tested immediately without recompilation, with easier debugging as errors are reported line-by-line when they occur, and more portable, then use interpreted.

If you want generally faster, complex but make amazing games, use compiled.

And use both Object and Classes in a language it is better and has more advantages!

So yeah it depends like you said, good job!

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community