Closed joskuijpers closed 10 years ago
This is sort of categorically strange for TurboSphere to abide by. The `engine' exposes only five functions.
Not the engine, but also the system scripts?
Well, it makes sense for us to claim 2-4 letter object/namespaces or so.
I just can't guarantee that TS won't be running plugins that provide non-standard functions from plugins. I can say that certain TS-specific functions (with all likelihood, plugin handling functions) could be very logically placed in a ts
object.
But...just to keep up with what I've done previously, I also would like to claim the object black_mamba. Older TS releases had secret test functions hidden in that.
Alright, but that is quite fine. One could also double prefix like tssql, it doesnt really matter. It is just important that it is very clear to users what code is pegasus and will work on all engines, and what is vendor specific.
Today I was working on my implementation of Buffer, which will be using Typed Arrays. I would like to allow my users to directly pass a Typed Array to create a Buffer. But to keep Pegasus working without TA, this can't be in Pegasus.
That brought my mind by the point I am trying to make: lets prefix engine-specific functions so they are easy to see and to make it possible to add them to Pegasus later.
I am claiming
amd
for Andromeda. I suggestts
for TurboSphere andsfml
for SFML but you are free in that.My function to retrieve the Typed Array from a buffer would be:\
Users can easily check if such function exists and use them. Using the
engine
class they can see what engine they run on.Any thoughts are welcome.