Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

Purely OO

Sign in to follow this  


I have had little time to work on the compiler or the language recently but hopefully it will pick up soon. Once I have more free time I still want to put a list of all the features at the top of this journal.

Though I did have some time today to research some things. I want this to be purely OO unlike C++, so a lot of things have to be changed...

  • Main will be required to be in a class.
  • Classes have to have an access specifier in front of the name.
  • All members/methods have to have an access specifier in front of the name.
  • All classes inherit from class object.
  • All types, including built-in primitives, are reference types.
  • Modified/removed primitive types.
  • Primitive types can be inherited.
  • Operators for the primitive types will be different(semantically) from C++.
  • Syntax for overloading will be different.
  • Implicit/Explicit Casting can be overloaded and they are treated as operators.
  • "Overload" keyword has to be used when overloading functions or operators.
  • "Override" keyword has to be used when defining a virtual method.

Dont think thats a full list of modifications for the whole language. Thats just what I can remember from the top of my head that has to do with the type system.

There are still many things I havnt had a chance to decide on yet that has to do with the type system, such as inheritance, multiple inheritance, contructors, virtual, pass by reference/value, deep/shallow copying, use of the resolution operator "::", and the base class, object.

Turning this into a purely OO language seems to be the biggest aspect of this project. Once that is complete then all that I have planned beyond that is trivial changes, "true" modules, syntactic sugar, and implementing a different syntax for templates.

But since type systems are very complex system and figuring out all the details for this [simple] type system, it will take some time.

Stay tuned!
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!