tags:

views:

192

answers:

4

It's said Symbian C++ has its own dialect,

can someone list the exact aspect that differs?

+2  A: 

Found some useful links...

  1. A PDF describing the differences with ANSI C++ for the N60 platform
  2. A tutorial listing some differences in variable types
  3. A forum discussion about the subject
littlegreen
+1  A: 

Symbian C++ is not a different language to 'normal' C++, but it has a lot of Symbian specific conventions.

Dynite
+1  A: 

Today the term Symbian C++ is also used to separate classical Symbian C++/S60 development from the more modern Qt development stack.

Teknolog
+5  A: 

A great resource for this is the Fundamentals of Symbian C++ book, available via the Symbian Foundation website.

The main ways in which the Symbian dialect of C++ differs from standard C++ are:

  • Exceptions are not used directly, i.e. you should not use 'throw' in Symbian C++. Instead, Symbian has its own form of exceptions called leaves. This dates back to the fact that, when Symbian was created, exceptions were not widely supported by compilers.
  • Exceptions must not be thrown from C++ constructors, so standard RAII techniques cannot be used. Instead, Symbian uses a two-phase construction idiom, and a mechanism called the cleanup stack. More details can be found on the Symbian Foundation website here.

In terms of standard libraries, there is now a port of the STL is available for Symbian, so all of the standard containers and algorithms are available. This, however, is a recent development, so the OS has its own utility classes for strings, arrays, hashes etc.

As Teknolog mentioned, an important recent development is the port of Qt to Symbian OS. From Symbian^4 onwards, the entire UI will be re-written using Qt, meaning that Qt will be the native application development toolkit. This means that, while Symbian C++ will still be used for middleware and lower-level development in the OS, application developers will use Qt instead, and therefore won't need to know about the Symbian dialect of C++. I described this in my answer to the question Qt or Symbian C++

Gareth Stockwell