Coder Social home page Coder Social logo

modern's People

Contributors

skrolikowski avatar

Stargazers

 avatar  avatar

Watchers

 avatar

modern's Issues

Graceful error on function 404

Modern should provide a graceful message of a user calls a function that doesn’t exist.

E.g. “Function you are looking for does not exist. Is it possible you forgot to include a Mixin?”

Namespaces - Part I

Idea - allow for namespacing modules for the use of mixins.

Use case: including multiple mixins with conflicting names (all will fire but what if you want to call just one).

Adding namespaces could provide an avenue to call a specific mixin’s function, while keeping function names short and to the point.

Namespaces - Part II

Now that namespaces are established, it would be useful to have a way to call a single Mixin function out of a Compound Function.

Terminology:
Compound Function - Module property that executes more than one function.
Mixin Function - Mixin property with a datatype of function.

Unable to override metamethods

Example:

function Foo:__string()
    return string.format('Foo(%d, %d)', self:unpack())
end

It will just continue to use Modern's __tostring method

`new(...)` vs `__new(...)`

💡 Idea:

Problem:
When calling a "new" Module, the new(...) functions will be called. If the Module includes Mixins, then their new(...) functions will be called as well. For some, this may not be acceptable, due to the Mixins requiring a different set of arguments.

Solution:
Introduce a new function __new(...), which will override a Mixin's new(...) call if one exists, otherwise fallback to the default new(...) function.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.