<<Back to the Main Page

Summary of topics to be discussed:


Namespaces and Function aliasing.
the member type modifier
get and set attributes
anonymous functions
java-style array notation
operator overloading
The #macro statement
The dynamic sizeof operator
The bounds statement
The scope implication operator (=>)
Suggestive type-checking.
Additional assembly support
Built-in Threading support.
Important Notes regarding the GNU GCC Compiler
In all other regards, C' is akin to C99.

Aliasing and Namespaces

A namespace is a collection of functions and custom types which is used to limit access, data, and clutter. In short, it's a global-level scope modifier. Multiple files can contain the same namespace, as long as there are no conflicting names. After including a header file, one can access various pieces of code via namespace with the following formats:
1:    import namespace_name ;

This imports all information from the namespace namespace_name from files that were '#included'

2:    import namespace_name::identifier;

This imports a specific function, object definition, or variable from the specified namespace "namespace_name," provided that its defining source file was included.

3:    import namespace_name::identifier as alias_name

Similar to #2, except it changes the name or typename of the specified code snippet the one specified by "alias_name". This is known as 'aliasing'.
The important difference to note in aliasing is when aliasing objects or functions that contain variables declared with the member type modifier, explained below.

The member type modifier

The member type modifier is akin to the use of the static type modifier when declaring variables within a function: the specified variables retain their values across function calls.
When applied to variable declarations within a struct declaration, the variables retain their values across all instances of that struct type.
The important difference is when aliasing an object/function:
The aliased function/type initializes member variables upon first use, whereas a normal function/type will not.
Keep in mind that static variables still hold true to their expected behaviors.

get/set and attributes

get and set are access control specifiers in regards to usage of an identifier on the right-side or left-side of a statement. Such an identifier shall be known as an attribute. An attribute's primary benefit is that it permits access to variables by objects one step higher in scope.

Defining an attribute can be done anywhere as long as they follow these rules:
general use:
return_type attribute_name
{
    get { /*code block*/ return something ; }
    set { /*code block*/ something = value; }
}


return_type specifies the default return value, returned by get. If get is not implemented for that particular attribute, then the return value should be declared either null or void. Any other behavior is currently undefined.

value refers to an implied parameter when an attribute is assigned a value:
attribute_name = some_value;
some_value.change(attribute_name);

when an attribute implements set access, it implies that a value will be passed, equivalent to: attribute_name.set(value). Thus
attribute_name = some_value really amounts to attribute_name.set(some_value) when implementing set access.

attribute_name is the identifier that will be referred to by the programmer. The identifier can be used within its definition. The behavior is specified as below:
If an attribute's name is used within its definition, then it shall refer to an automatically allocated private variable of the specified return type, and can be modified as such.
Otherwise, the attribute is a parameterless function treated for all intents an purposes like a variable.

Note: get and set are quite similar in most aspects, to their C# counterparts.

To be explained:

Anonymous Functions

Array Notation

Operator Overloading

The #macro Preprocessor Statement

The dynamic sizeof operator

The bounds statement

The scope implication operator (=>)

Suggestive type-checking.

Additional Assembly Language Support

Posix Threads



Additional operators

The logical xor operator. ^^
essentially equivalent to the following macro:
#define XOR(X,Y) (!!(X) ^ !!(Y))

Important Notes

We are truly in awe of the GNU GCC Compiler, and are seriously considering incorporating GCC into our code, so that we might compile only down to a form of object code readable by GCC, and let it do the rest, so that programmers can receive the most benefit from using C Prime.

In the near future, we shall add sample code snippets and textpad syntax hilighting files for download.
<<Back to the Main Page

This is NOT to be confused with a similar project, Ayli, which is under review for a grant, also under the name C Prime.
The Ayli programming language, (As You Like It) is a separate student project in development primarily for DotNet Technologies.
Ayli is NOT C'. It originally had the name C', whereas C' originally had the name Curried C.
The names were changed in order to fit, since Ayli's syntax can no longer be readily identifiable as c-style,
and C' is far more catchy than Curried C.

SourceForge.net Logo