Git Product home page Git Product logo

Comments (5)

woollybah avatar woollybah commented on August 24, 2024

I'd say this is a valid error. Perhaps the error message should be more explicit, but I think it should fail, regardless of what legacy bcc does.

from bcc.

GWRon avatar GWRon commented on August 24, 2024

If course I think NG is allowed to error on more things - as long as it explains why it is failing. Do not misunderstand me: I know that the issues are errors in my code :p

from bcc.

GWRon avatar GWRon commented on August 24, 2024

While "return a(1)" is a valid error - shouldnt a subtraction of "void" result in something like 0?

No ... I am not "joking" (albeit I started this comment to write something not that serious)

The function b:int() returns an integer value. When doing the math operation of "void - void" you should end up with "0", same for "void/void" = "1". I mean, these are rare special cases and really constructed ... but maybe there are more cases of "math(void)" returning real mathematic values.

I still understand, that the above is something really "constructed" and no real-world-scenario.

from bcc.

woollybah avatar woollybah commented on August 24, 2024

If you are using Strict, then you can do what you like.
However, I think SuperStrict should at least try to be super-strict, otherwise we may want to rename it to something like "MostlySuperStrict" :-)

In legacy BlitzMax, all functions return at least Int, regardless of strictness. C doesn't let you mix and match, and it turns out that emscripten really doesn't like you doing "fun" things with inappropriately mixed function signatures. (You may consider emscripten to be ReallySuperStrict)

On 23 Jan 2015, at 16:09, Ronny Otto [email protected] wrote:

While "return a(1)" is a valid error - shouldnt a subtraction of "void" result in something like 0?

No ... I am not "joking" (albeit I started this comment to write something not that serious)

The function b:int() returns an integer value. When doing the math operation of "void - void" you should end up with "0", same for "void/void" = "1". I mean, these are rare special cases and really constructed ... but maybe there are more cases of "math(void)" returning real mathematic values.

I still understand, that the above is something really "constructed" and no real-world-scenario.


Reply to this email directly or view it on GitHub.

from bcc.

GWRon avatar GWRon commented on August 24, 2024

Like said: I am totally open for just not allowing void as result for something different ... stay tuned for next issues :p

You may close this issue when introducing an error-message ("invalid return type").

from bcc.

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.