lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]




On 2017-09-08 11:15 PM, KHMan wrote:
On 9/9/2017 3:59 AM, Petri Häkkinen wrote:

On 8 Sep 2017, at 5.16, KHMan wrote:

 "Most games nowadays use components one way or another"

I'm not familiar with this "components" thing, or maybe I just didn't look in the right places. I am also confused by "runtime traits".


There's a pretty good explanation of entity-component systems in Wikipedia:

https://en.m.wikipedia.org/wiki/Entity–component–system

Ah, many thanks.

Well, looking at the references, I guess it's not terminology that is widely known beyond game programming, but there is some effort to make this a brand of sorts.

The word 'runtime' seems to be getting overloaded with a lot of things. I find it a little weird to be talking about 'runtime' on an interpreted language.

All the best to Soni, I applaud this kind of experimentation. :-)


Java is (arguably) an interpreted/scripting language. Yet Java has compile-time generics, but not runtime generics. So no, "runtime" on an interpreted language isn't all that weird. (Java also has runtime types in addition to static types. The rules for static types are a bit different from runtime types - you can't call methods on `null`, for example, because null is its own type, and so it generates a NullPointerException (instead of segfaulting or doing other bad things). You also can't reinterpret types like String as int.)

Rust has compile-time traits. But it does not, in fact, have runtime traits. If you make a trait and impl that trait on someone else's struct, reflection with that struct will not be able to see your trait, and thus won't be able to make trait objects with it.

Cratera has runtime traits. What "runtime traits" means is currently not well-defined, but I'm working on that. (This might end up not being called "runtime traits" AT ALL in the future.)

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.