Comments (16)
This is a good idea, we should have error handling there. The rest of the engine sources use functions from Engine/Base/Memory.h with error handling, but ECC does not link to anything else so it needs separate error handling.
from serious-engine.
I suggest to avoid ignorance of return values a bit more.
Are you interested to apply aspect-oriented software development?
How do you think about to encapsulate error detection and corresponding exception handling as a reusable aspect in your software?
from serious-engine.
How exactly do you imagine that?
from serious-engine.
How do you think about to improve static source code analysis also for your software?
Do you find information sources like the following useful?
- Article "A Reusable Aspect for Memory Allocation Checking"
- Document "Aspect-Oriented Software Development - An Introduction" by Johan Brichau and Theo D'Hondt
- Paper "On Typesafe Aspect Implementations in C++" by Daniel Lohmann and Olaf Spinczyk
from serious-engine.
The last link doesn't work for me, and the first two don't really answer my question. Memory allocation functions are already error-checked in the engine, see Engine/Base/Memory.h. What exactly do you propose to change in there and what benefit will it bring?
from serious-engine.
Memory allocation functions are already error-checked in the engine, …
Are there any functions left over where null pointers will not be handled by the mentioned memory allocation approach?
How do you think about to delegate the source code transformation for more complete exception handling to a development tool like "AspectC++"?
Would you like to reduce efforts for source file maintenance in any ways?
from serious-engine.
Please answer my previous question first.
What exactly do you propose to change in there and what benefit will it bring?
from serious-engine.
- I propose to handle cross-cutting concerns in a more structured way.
- You can benefit from the specification of special source code patterns by automatic code generation, can't you?
from serious-engine.
I don't know. You make no clear indication of what you propose. But feel free to try coding that into Serious Engine and we'll see if it really brings any benefit.
from serious-engine.
Would you like to look a bit more at possibilities around the combination of pointcuts and advices into reusable aspect specifications?
from serious-engine.
No thanks, if that wouldn't be too hard I'd like to see how exactly your proposition will affect Serious Engine code. In other words, can you show me some code diffs?
from serious-engine.
Do you get further ideas from the following example for a small AspectC++ script?
…
aspect string_duplication_check
{
advice execution("% * strdup(...)"): after()
{
if (*tjp->result() == NULL)
abort();
}
};
…
from serious-engine.
It seems more complicated than already existing AllocateMemory function that does just that error check. I don't understand why you think it is better.
from serious-engine.
- Does the function "strdup" get the needed memory from the mentioned customised allocation approach?
- Is the aspect specification easily extensible for more use cases?
from serious-engine.
I'm sorry, but this conversation doesn't seem to be constructive. You initially made a good point, but then didn't propose a concrete and useful code modification. As I said, you are free to try whatever you wish, maybe you were right after all. If you manage to implement aspect-oriented approach in Serious-Engine, that's great, I'd love to see that in action. But until then I'll have to close this discussion.
from serious-engine.
Would you like to care for the failure possibility of a function like "fprintf"?
from serious-engine.
Related Issues (20)
- Compiling issues HOT 9
- Possibly error in Bison Source file. HOT 7
- Add gitter chat
- fatal error C1083: Cannot open include file: 'Engine/Classes/BaseEvents.h': No such file or directory HOT 4
- How use GRO file? HOT 9
- Checking with PVS-Studio static analyser
- Why was OGG support removed? HOT 2
- freenode channels? HOT 8
- High-res logo? HOT 3
- Build error SDK issue?
- visual studio 6 project files available? HOT 1
- First Encounter HOT 3
- Syntax Error while building HOT 4
- build instructions for Linux
- How to compile Engine with vc 2013
- 'yyval' is used before being initialized ERROR on logo HOT 3
- Serious Engine 2 source code release? HOT 1
- [MSVC][std:c++latest] Serious_Engine build failed due to error C2666: 'CValuesForPrimitive::operator ==': overloaded functions have similar conversions
- OpenAL Soft support HOT 1
- Any chance for a source code release of Fusion?
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 serious-engine.