Comments (5)
Hey, sorry for the late response, I forgot to put the repository on my watch and didn't notice the issue until now.
Most of those would be very welcome, constexpr, default keyword and inline value initializes especially. I tend to make these updates myself as I come across older code as well.
I don't think we need noexcept as we don't throw exceptions. String is generally only used in non-performance critical bits of code, and even then I'm pretty sure I avoid copying them around, but if you can find a good place for it, it wouldn't hurt.
C++17 I think we should wait for a bit. I tried switching to nested namespaces in a few places and was getting warnings on macOS, but maybe I just need to update something.
from bsf.
Thanks for the feedback!
I'm really happy to hear that you're open to constexpr, default keyword, and inline value initializers. So many projects out there straight up refuse to accept pull requests for those.
I'd actually argue that the noexcept keyword has value specifically because BSF doesn't use exceptions much. (Unless you're disabling exceptions at compile time?). The noexcept keyword, for functions that aren't inline in the header file, allow the compiler to assume that no exceptions will be thrown, and drop any exception handling code that may be generated as a result of the function call.
It's mostly useful for low level library code that gets called everywhere. At my day job we started using it and found a small drop in binary sizes as a result. Mileage may vary, though.
As for the StringView thing, I implemented a similar feature at my day job and saw a pretty nice reduction in temporary object creation... That being said, we have some 200+ developers all hacking away, so mistakes are significantly more likely there.
If I get bored sometime, I'll implement a StringView like class and demonstrate how it would be integrated, but I wouldn't say to hold your breath :-).
As for C++17, I'd be all for adopting it fully, but I'm not too worried about it. Feel free to switch as you see fit based on the other platforms.
from bsf.
Exceptions are fully disabled at compile time. I do wish to move everything to C++17 eventually, at the moment backwards compatibility is not a concern. When they are more mature, I want to do a full refactor with C++ modules as well.
from bsf.
Modules weren't approved for the c++17 version of the standard, were they?
So for exceptions, is the plan for those to stay disabled? If so, then yea, noexcept doesn't do any good. Though, if there's uncertainty on if they'll be enabled in the future, we might want to add them where appropriate for sake of not killing performance if someone enables exceptions.
from bsf.
Sadly no :(
I don't have plans on enabling exceptions. The code isn't written for handling exceptions so enabling them probably wouldn't have much benefit, so I really doubt someone would do so.
from bsf.
Related Issues (20)
- Crash on loading skybox texture asset HOT 12
- error reporting on shader compile does not work HOT 7
- way to enable vertex program point size with gl renderer HOT 6
- Auto aspect ratio for camera HOT 1
- compiling error in vs 2019 HOT 1
- Vulkan rendering crashing, in master HOT 5
- add dependencies through plugins[Feature] HOT 3
- First example crashes If started directly from visual studio 2019 HOT 1
- Bug: Imgui plugin demo fails compilation
- alternativeto card
- How bout metal and mobile support (ios, android)?
- get exception when closing the my app window
- macOS 10.14+ support
- Mesh and material in one file
- memcpy parameters flipped
- How to turn off the automatic download function in CMAKE
- [PSA] DEAD - Project is [assumed to be] dead HOT 3
- Cmake auto downloading Resource link invalid HOT 1
- [PSA] - Project Death Update HOT 4
- Domain hijacked
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 bsf.