The primary difference between CSS and C++ is that CSS does not support the complex set of rules which determine which of a set of functions with the same name should be called given a particular set of arguments. Thus, CSS does not allow multiple functions with the same name. By avoiding the function-call resolution problems, CSS is much faster and smaller than it otherwise would be.
One consequence of the lack of name resolution is that only default (no argument) constructors can be defined. This also obviates the need for the special parent-constructor calling syntax.
Also, at the present time, CSS does not support the definition of
operator
member functions that redefine the operation of the
various arithmetic operators. Further, it does not provide access
control via the private
, public
, and protected
keywords, or the const
type control, though these are parsed (and
ignored). Thus, it also does not deal with the friend
constructs
either. While these language features could be added, they do not make
a great deal of sense for the interactive script-level programming that
CSS is designed to handle.
CSS does support multiple inheritance, and the overloading of
derived member functions. It does not support the inlining of
functions, which is a compiler-level optimization anyway. The keyword
inline
will be parsed, but ignored.
Also, note that CSS gives one access to hard-coded classes and types (via TypeAccess), in addition to those defined in the script.
Templates are not supported for script-based classes, but are supported in hard-coded classes (via TypeAccess).
Exception handling is not supported, and probably will not be.
Since the primary use of CSS is for relatively simple pieces of code that glue together more complex hard-coded objects, and not implementing large programs, the present limitations of CSS will probably not affect most users.