Unless it is obvious from the example above why removing them would be a good
thing, I can list some of the reasons:
* The wrappper functions are just clutter - they wouldn't be needed if we use
C++ all over
* They cost performance and extra memory in cases like the one in the example,
since it has to make a deep copy of the data structures.
* The C-version of the API is more error-prone; for example there is a risk for
memory leaks since you can forget to free the memory that was allocated using
malloc().
The wrapper functions ought to be a pure and simple conversion between C and
C++. If the wrapper function does something extra that the C++ doesn't do then
there is a problem with readability - I wouldn't expect this.
---
** [tickets:#2142] imm: Use C++ for IMM library**
**Status:** accepted
**Milestone:** 5.2.FC
**Created:** Thu Oct 27, 2016 04:31 AM UTC by Hung Nguyen
**Last Updated:** Thu Oct 27, 2016 03:28 PM UTC
**Owner:** Hung Nguyen
Use c++ for imm library.
---
Sent from sourceforge.net because opensaf-tickets@lists.sourceforge.net is
subscribed to https://sourceforge.net/p/opensaf/tickets/
To unsubscribe from further messages, a project admin can change settings at
https://sourceforge.net/p/opensaf/admin/tickets/options. Or, if this is a
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
The Command Line: Reinvented for Modern Developers
Did the resurgence of CLI tooling catch you by surprise?
Reconnect with the command line and become more productive.
Learn the new .NET and ASP.NET CLI. Get your free copy!
http://sdm.link/telerik
_______________________________________________
Opensaf-tickets mailing list
Opensaf-tickets@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets