More background on changing BOOL to bool
To all,
Here is some background information on the proposed change of BOOL to bool.
We're trying to move PTLib closer to the C++ standard, including STL, because that has many advantages. Not only will it reduce the size of the code, and increases compatibility with other libraries, but it will leverage off the enormous investment that other developers have made into the standard libraries and will increase the usefulness of PTLib by making the API less "proprietary"
To do this, PTLib will require several changes. None of these will come without pain, but it is my personal opinion that the advantages will outweigh the disadvantages. These changes are:
- Change BOOL to bool - Change PString to use std::string in some way - Change PArray to use std::vector, PDictionary to use std::map etc
The change from BOOL to bool is probably the biggest change. We're hoping that the rest of the changes can be done transparently, but I think it is inevitable that there will be some API tweaks required.
I'd be interested in hearing people's opinions on these thoughts, especially if the general consensus is that it is not worthwhile.
Craig
----------------------------------------------------------------------- Craig Southeren Post Increment – VoIP Consulting and Software craigs@postincrement.com.au www.postincrement.com.au
Phone: +61 243654666 ICQ: #86852844 Fax: +61 243656905 MSN: craig_southeren@hotmail.com Mobile: +61 417231046 Jabber: craigs@jabber.org
"Science is the poetry of reality." Richard Dawkins
Craig
I certainly have no issue with making changes to make ptlib more C++ standard especially the PString (Another one to consider is Plist to std::list) and would be happy to assist as long as where-ever possible the changes are transparent to the end developer which most of these changes appear to be.
This is my only reservation with BOOL to bool change and ensuring end projects backwards compatibility especially without the C++ virtual issues (which IMHO is a showstopper). If we can overcome that then definitely I'm on board.
Simon
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com]On Behalf Of Craig Southeren Sent: Monday, November 19, 2007 11:32 AM To: Robert Jongbloed Cc: h323plus@lists.packetizer.com; Opalvoip-devel@lists.sourceforge.net Subject: [h323plus] More background on changing BOOL to bool
To all,
Here is some background information on the proposed change of BOOL
to bool.
We're trying to move PTLib closer to the C++ standard, including
STL, because that has many advantages. Not only will it reduce the size of the code, and increases compatibility with other libraries, but it will leverage off the enormous investment that other developers have made into the standard libraries and will increase the usefulness of PTLib by making the API less "proprietary"
To do this, PTLib will require several changes. None of these will
come without pain, but it is my personal opinion that the advantages will outweigh the disadvantages. These changes are:
- Change BOOL to bool - Change PString to use std::string in some way - Change PArray to use std::vector, PDictionary to use std::map etc
The change from BOOL to bool is probably the biggest change. We're hoping that the rest of the changes can be done transparently, but I think it is inevitable that there will be some API tweaks required.
I'd be interested in hearing people's opinions on these thoughts, especially if the general consensus is that it is not worthwhile.
Craig
Craig Southeren Post Increment – VoIP Consulting and Software craigs@postincrement.com.au www.postincrement.com.au
Phone: +61 243654666 ICQ: #86852844 Fax: +61 243656905 MSN: craig_southeren@hotmail.com Mobile: +61 417231046 Jabber: craigs@jabber.org
"Science is the poetry of reality." Richard Dawkins
Simon Horne wrote:
Craig
I certainly have no issue with making changes to make ptlib more C++ standard especially the PString (Another one to consider is Plist to std::list)
I only mentioned PArray and PDictionary, but the following "etc" was supposed to include PList, and all of the other PCollection and PContainer ancestors :)
and would be happy to assist as long as where-ever possible the changes are transparent to the end developer which most of these changes appear to be.
This is also our concern. Unfortunately, C++ does not help us much in the regard, and we don't see any other options. I'd really love to see some alternatives, if there are any.
This is my only reservation with BOOL to bool change and ensuring end projects backwards compatibility especially without the C++ virtual issues (which IMHO is a showstopper). If we can overcome that then definitely I'm on board.
If you have an ideas on how to do this, then we're all ears. This is the best we've managed to come up with so far - the reason we're opening up the discussion is the hope that somebody else has a better/easier way :)
If not, then the project as a whole needs to decide whether to bite the bullet or give up. We can't do any of the other C++ standard stuff until this is resolved, so it's pretty important.
Craig
----------------------------------------------------------------------- Craig Southeren Post Increment – VoIP Consulting and Software craigs@postincrement.com.au www.postincrement.com.au
Phone: +61 243654666 ICQ: #86852844 Fax: +61 243656905 MSN: craig_southeren@hotmail.com Mobile: +61 417231046 Jabber: craigs@jabber.org
"Science is the poetry of reality." Richard Dawkins
I support to move PTLIB to closer to C++ standard and take advantage of existed libraries. During the transition, the backward compatibility should be taken care, but it will not be a barrier to stop the transition.
Richard Quan o: 650-525-3376
-----Original Message----- From: h323plus-bounces@lists.packetizer.com [mailto:h323plus-bounces@lists.packetizer.com] On Behalf Of Craig Southeren Sent: Sunday, November 18, 2007 7:32 PM To: Robert Jongbloed Cc: h323plus@lists.packetizer.com; Opalvoip-devel@lists.sourceforge.net Subject: [h323plus] More background on changing BOOL to bool
To all,
Here is some background information on the proposed change of BOOL to bool.
We're trying to move PTLib closer to the C++ standard, including STL, because that has many advantages. Not only will it reduce the size of the code, and increases compatibility with other libraries, but it will leverage off the enormous investment that other developers have made into the standard libraries and will increase the usefulness of PTLib by making the API less "proprietary"
To do this, PTLib will require several changes. None of these will come without pain, but it is my personal opinion that the advantages will outweigh the disadvantages. These changes are:
- Change BOOL to bool - Change PString to use std::string in some way - Change PArray to use std::vector, PDictionary to use std::map etc
The change from BOOL to bool is probably the biggest change. We're hoping that the rest of the changes can be done transparently, but I think it is inevitable that there will be some API tweaks required.
I'd be interested in hearing people's opinions on these thoughts, especially if the general consensus is that it is not worthwhile.
Craig
----------------------------------------------------------------------- Craig Southeren Post Increment - VoIP Consulting and Software craigs@postincrement.com.au www.postincrement.com.au
Phone: +61 243654666 ICQ: #86852844 Fax: +61 243656905 MSN: craig_southeren@hotmail.com Mobile: +61 417231046 Jabber: craigs@jabber.org
"Science is the poetry of reality." Richard Dawkins --------------------------------------------------------
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited.
--------------------------------------------------------
participants (3)
-
Craig Southeren
-
Quan, Richard
-
Simon Horne