Giter Club home page Giter Club logo

Comments (6)

peq avatar peq commented on May 29, 2024

This would break the current resolution rules for function references as in "TimerStart(..., function print)". Please also add suggestions on how to change this with respect to overloading.

from wurstscript.

Frotty avatar Frotty commented on May 29, 2024

"You can't use overloaded functions in callbacks" :D

from wurstscript.

peq avatar peq commented on May 29, 2024

What should the exact rules for overloading be?
Maybe you can take http://docs.oracle.com/javase/specs/jls/se7/html/jls-15.html#jls-15.12.2 as an inspiration for the specification. Or you see that overloading can add quite some complexity to the language. Of course it will be simpler for Wurst as we have no backwards compatibility issues and no boxing and no type coercions but still we have to think about how overloading works with overriding, subtyping, packages, type inference, generics, etc.

You might also want to read http://www.roseindia.net/javatutorials/overloading_considered_harmful.shtml

So currently I am against adding overloading.

from wurstscript.

Frotty avatar Frotty commented on May 29, 2024

meh, I (ofc) didn't think about the full scale consequences, it would just be a cool enhancement to have.

from wurstscript.

peq avatar peq commented on May 29, 2024

The point is: I am not sure if it is an enhancement and it surely will complicate the compiler :D

from wurstscript.

peq avatar peq commented on May 29, 2024

Done, but still needs some testing and documentation.

from wurstscript.

Related Issues (20)

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.