Giter VIP home page Giter VIP logo

Comments (4)

Menotdan avatar Menotdan commented on June 9, 2024 1

(though couldn't those just be an int?)

I think this is a good solution.. but an enum might still work if you can implicitly cast it to a bool like you normally can in C++, and in C#. I'm not sure how much benefit there is to using a enum, though.

from flaxengine.

mafiesto4 avatar mafiesto4 commented on June 9, 2024 1

Most of the engine APIs return true on error - design decision based other common programming APIs that return 0/false on success. For stdlib we could improve some return codes such as Dictionary removal to return true when item was properly removed. Also, INetworkDriver APIs need refactor to match results.

Feel free to indicate other APIs that could benefit from this change. Ofc, we won't introduce breaking changes now - that's not critical issue thus I would move such refactor once we start working on Flax 2.

from flaxengine.

envision3d avatar envision3d commented on June 9, 2024

+1 for true on success. No preference for status code returns (though couldn't those just be an int?)

from flaxengine.

mtszkarbowiak avatar mtszkarbowiak commented on June 9, 2024

@envision3d I didn't want int because of idiotic implicit casts to bool (in C++). I would want a compiler to scream at me, if I tried to assign status code value to a bool.

from flaxengine.

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.