irungentoo / toxcore

The future of online communications.
https://tox.chat/
GNU General Public License v3.0
8.74k stars 1.27k forks source link

Check return codes everywhere #1075

Open elfring opened 10 years ago

elfring commented 10 years ago

I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.

Would you like to add more error handling for return values from functions like the following?

elfring commented 9 years ago

I suggest to avoid ignorance of return values a bit more. Would you like to detect every error situation as early as possible?

GrayHatter commented 9 years ago

closed for not having any activity in a year... reopened, sorry it got caught in crossfire

elfring commented 9 years ago

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?

iphydf commented 8 years ago

@elfring is there an AOP framework for C? Or does AspectC++ work for C code?

elfring commented 8 years ago

is there an AOP framework for C?

How do you think about to look into the archives for corresponding approaches once more?

Or does AspectC++ work for C code?

iphydf commented 8 years ago

Ok, so https://github.com/TokTok/toxcore/pull/143 would solve the "However, the AspectC++ parser is a C++ parser and there are a few incompatibilities" issue. It generating C++ code means our code becomes effectively C++, and can no longer be compiled by simple C compilers. Right now, it seems that toxcore doesn't support platforms for which no C++ compiler exists, but the fact that it's written in C to begin with indicates an intention to support them.

Do you know whether the "pure C aspectc" that was planned for 2006 actually happened?

iphydf commented 8 years ago

The manual that comes with the most recent version (2016, 10 years later) says:

5.2.7 Support for Plain C Code
Currently ac++ generates C++ code, which cannot be compiled by a C compiler.
As for many hardware platforms in the embedded domain no C++ compiler is
available we are actively looking for a solution.

So I guess not. And I don't know what "actively looking for a solution" means anymore.

GrayHatter commented 8 years ago

And I don't know what "actively looking for a solution" means anymore.

translation: We posted about it on the internet once, and no one got back to us yet...

elfring commented 8 years ago

How do you think about to influence the software evolution a bit more around development tools like "ACC" and "AspectC++"?