Giter Club home page Giter Club logo

Comments (16)

SLAwww avatar SLAwww commented on September 15, 2024

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.

elfring avatar elfring commented on September 15, 2024

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.

SLAwww avatar SLAwww commented on September 15, 2024

How exactly do you imagine that?

from serious-engine.

elfring avatar elfring commented on September 15, 2024

How do you think about to improve static source code analysis also for your software?

Do you find information sources like the following useful?

from serious-engine.

SLAwww avatar SLAwww commented on September 15, 2024

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.

elfring avatar elfring commented on September 15, 2024

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.

SLAwww avatar SLAwww commented on September 15, 2024

Please answer my previous question first.

What exactly do you propose to change in there and what benefit will it bring?

from serious-engine.

elfring avatar elfring commented on September 15, 2024
  • 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.

SLAwww avatar SLAwww commented on September 15, 2024

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.

elfring avatar elfring commented on September 15, 2024

Would you like to look a bit more at possibilities around the combination of pointcuts and advices into reusable aspect specifications?

from serious-engine.

SLAwww avatar SLAwww commented on September 15, 2024

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.

elfring avatar elfring commented on September 15, 2024

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.

SLAwww avatar SLAwww commented on September 15, 2024

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.

elfring avatar elfring commented on September 15, 2024
  • 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.

SLAwww avatar SLAwww commented on September 15, 2024

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.

elfring avatar elfring commented on September 15, 2024

Would you like to care for the failure possibility of a function like "fprintf"?

from serious-engine.

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.