View Single Post
08-28-18, 07:57 AM   #4
kurapica.igas
A Chromatic Dragonspawn
Join Date: Aug 2011
Posts: 152
Just keep up, addons are first created to meet our own requirement, then we share if anybody need them. For me, the biggest gain from the WOW is my OOP lib which I already used for my web servers.

The code in Scorpio in not heavy, it'll bind the function directly to the system event, hook and etc. And about the __Async__, it used a heavy coroutine schedule system, but that system could keep the full fps for all addons based on the Scorpio.

Like your validation system, the PLoop(the heavy part that they mentioned) also provide a full type definition and validation like:
Lua Code:
  1. __Arguments__{ Number, String/nil } -- number require, string optional
  2. function Test(num, str)
  3. end

The cost is tiny since I used several techniques to avoid the if-check, and the validation can be easily turn off with one setting so there is no need to change the code.

There are several company started to use the PLoop on their Unity3D games, the type valiation and other features help them fixed thousands errors, like wrong type, spell error and other problems, like you said, without a fine validation system, an error can be spread to somewhere hard to trace back.

The type validation may not be much powerful for addons, since they are tiny projects. But there are more features can be provided with a fine OOP system. The blz's mixin system is just a basic one.

Last edited by kurapica.igas : 08-28-18 at 08:14 PM.
  Reply With Quote