scarlettgamestudio / scarlett-framework

Scarlett Framework repository
https://scarlett.cothesia.com/
Apache License 2.0
7 stars 2 forks source link

Global Extensions #22

Closed Apidcloud closed 7 years ago

Apidcloud commented 7 years ago

I think Global extensions of built-in objects such as Array and String should not be allowed.

An alternative would be to extend from said classes (e.g., prefix Sugar) and implement those extensions there.

Apidcloud commented 7 years ago

Or use Lodash arrays and string instead. This is probably a better solution overall.

Apidcloud commented 7 years ago

We can use it to replace most of the common/utils functions.

Also, do we use them at all outside the library? @joafalves

joafalves commented 7 years ago

I don't think we need an external library but I agree that those helper functions should be scoped.

joafalves commented 7 years ago

Also, do we use them at all outside the library? @joafalves

Yes, it might be useful for users (scripting)