Skip navigation.

Software Development

Correcting The Future

Project V: Finished Static Types

,

I'll be posting updates as I make some progress. I just finished some static types. Only their definitions though. A few design time meta types. One runtime meta type. Integer, Enum, Bool, Endian, Int32, UInt32 and String.

Next is defining the component system. This will enable functionality not only for operations on the values of these types, but also for manipulating these types within the development environment. Things like adding properties, defining them and simply setting the value. Enum is a tough one where Endian and Bool are partially derived from. Bool for example has a list of possible options, namely true and false. These are values 0 and 1 with names false and true with types of UInt32. The primary base type of Bool itself is a Meta type. The meta value points to one of the valid options. Bool also inherits from Enum which will inherit its functionality for converting this meta type into the type of its value (UInt32) at runtime. And this is basically how you add functionality to your types. You setup components that act on a certain type and if you want your values to support this functionality, you derive them from these types. This is one purpose of multiple inheritance.

While this may look a little like OOP, it is not. The compiler may require input of your type (left up to you to define), but may require other quite precise input and outputs. Some of these may be other types that your components will have to take into account. One example is conversion. In OOP, do you write the conversion in the source object or the destination? With C++, you have copy constructors and the equal operator as well as your own custom methods. With Project V, you just define a component that takes an input of one type and an output of another type. This component should also be derived from the appropriate transformation. In this case, it would likely be called "Conversion". I haven't decided yet. A nice side-effect of this is that if you define a conversion routine for Int8 to Int16 and one for Int16 to Int32, you don't need to define one for Int8 to Int32. Well, the initial version will require it and it's better this way, but I'll eventually write code to let it do this. If eventually a component is built to directly convert from Int8 to Int32, then your software will automatically use it.

Using the same method described above, you can define types like templates in C++ if you wish. This is actually what Enum is anyways. It'll select a runtime type and with this type comes all its functionality specifically for that type. Effectively a template. With Boolean, both true and false are of the same type, but this is not a requirement for other types based on Enum. I hardcoded the functionality of Enum. However, anyone will be able to define their own design time and compile time functionality for their own types. In essence, this is why I believe "editors" will be so important. This is where that power is drawn from. Gear the development environment toward your solution and NOT like every other development package out there where you must conform to the language or development package. And if you think that the dataflow environment will force you into a certain way of doing things, there is a little truth to that down below, but you'll be in for a BIG surprise.

So that's where I'm at now. I have TONS of definitions to write for what kind of functionality I want. I really like the system I have now. BTW, BACKLINKS ARE GOLD! These things are the multi-purpose tools of programming. All my meta types use them. Actually, sets are the core of the Project V system and backlinks are found everywhere. So reference counting isn't used for the IDE as much as backlinks. I only have one place for reference counting and I'm thinking of removing it if I can figure out how. Backlinks do take up more memory, but I like it way better.

Components are the final coup d'état before Project V can take a foothold. I'm hoping to get this done today. At least the definition. And while the IDE is still a ways away, all this code will be used by the IDE. So I won't have to code up everything. Only the visual parts. The backend will already be done.

Building a Development Environment (or Language)Who Don't Love Java? ME! But Not Because It's Java.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

January 2008
S M T W T F S
December 2007February 2008
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31