Comments (4)
(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.
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.
+1 for true
on success. No preference for status code returns (though couldn't those just be an int
?)
from flaxengine.
@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)
- [Suggestion] Directional Light Cookie
- [Suggestion] Render Texture Asset Type HOT 1
- QoL - Consistent unit of measurement on character controller HOT 1
- Importing normals of fbx meshes done in Blender 4.x broken HOT 1
- TextBox: Wrong text highlights with center and far horizontal alignment
- [ Feature Request ] Add option to apply specific change on prefab HOT 1
- [Suggestion] Material Function Input Ordering
- Third-Party Libraries Failing to Load Assemblies in Cooked Game HOT 1
- Adding a newline into a `[Header]` attribute cuts off the displayed text
- Issues with selecting a csg brush in the viewport
- EXR file import crashes the editor HOT 2
- [Feature Request] Change SDF distance without enabling DDGI HOT 1
- [Bug?] Something is wrong with the graphics HOT 5
- [Feature Request] Import multiple UV Channels
- Cannot deserialize ... from Json Asset because it doesn't implement ISerializable interface. but is implemented HOT 3
- Suggestion: Adopt reversed-Z HOT 1
- The HDR in the engine is REVERSED!!!
- [Bug] Metallic materials aren't affected by Skylight HOT 4
- Nested arrays serialization/display issues HOT 4
- TAA+Downsampling is broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flaxengine.