3

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

can someone list the exact aspect that differs?

user198729
  • 61,774
  • 108
  • 250
  • 348
  • technically each compiler is its own dialect of C++. the g++ is different from the vc++, etc. They each have features that aren't part of the standard and each may or may not have implemented the full standard, in different ways. – xenoterracide May 13 '10 at 15:39
  • @xenoterracide: True, but it certainly used to be that Symbian/C++ was not much like standard C++ at all. OK, so-called "standard C++" implementations often lack a few bits and pieces, such as `export`, or correct name resolution in templates. But at one time Symbian/C++ didn't have exceptions. Or types as template parameters (only integers). Or any of the standard headers. It was its own thing, based on a pre-standard version of C++. Not really comparable with an attempt to implement C++ that falls short somehow. – Steve Jessop May 13 '10 at 16:11

4 Answers4

5

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++

Community
  • 1
  • 1
Gareth Stockwell
  • 3,112
  • 18
  • 23
2

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
tambre
  • 4,625
  • 4
  • 42
  • 55
littlegreen
  • 7,290
  • 9
  • 45
  • 51
1

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

Dynite
  • 2,313
  • 5
  • 30
  • 38
1

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