freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Devel] C++ API for FreeType - Portability


From: Ed Keith
Subject: Re: [Devel] C++ API for FreeType - Portability
Date: Fri, 11 Jan 2002 10:57:23 -0800

Portability becomes a much more critical issue with C++ since many platforms 
don't implement all features of C++, or worse, don't implement them 
consistently.  If contemplating a switch to C++, a documented coding standard 
covering portability issues should be carefully documented and agreed upon in 
advance - if not it's likely the C++ version won't be portable to many 
platforms.

Mozilla's C++ Portability Guide* is a good place to start (it's also an 
interesting read to see what works and doesn't work across different 
platforms).  C is nice in its consistent support on almost all platforms and 
embedded systems.  With C++ you must be ***much more careful*** if you want to 
keep it portable.

My 2 cents (or my 2 Euros?),
Ed

* Mozilla C++ Portability Guide
http://mozilla.org/hacking/portable-cpp.html



At 05:10 AM 1/11/02, Graham Asher wrote:
>I somehow missed an earlier comment:
>
>>  A - is there enough interest in a C++ version of the library
>>      (and more especially a C++ native API)
>>
>>  B - would doing so drastically reduce our development time
>>      (man-years ??)
>
>I am very much in favour of a C++ version. I won't argue in detail for that
>now - I have done so on previous occasions - except to say that I have
>successfully re-implemented certain important parts of FreeType in C++,
>including the outline structure (in my version, a class) and both the
>monochrome and anti-aliasing rasterizing engines.
>
>I converted FreeType code to C++ *very* conservatively, retaining nearly
>every line of the original code unchanged, partly because I didn't
>understand some aspects of the logic I was converting, but was able to
>create a system - as far as it went - that was more usable and easier to
>maintain than the original, mainly because of basic C++ facilities like
>constructors and private data members, although there are notational
>advantages as well, like being able to declare variables at their first
>point of use.
>
>So I am reasonably well placed to comment on API design and conversion to
>C++, if my help is wanted.
>
>Graham Asher




reply via email to

[Prev in Thread] Current Thread [Next in Thread]