April 26, 2024, 10:14:07 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Aurora in Aurora

Started by Steven Picard, October 31, 2005, 08:30:46 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Steven Picard

Are you planning on converting the Aurora C\C++ code to Aurora?  Hopefully, when Aurora is done, C\C++ code should convert very easily. 

I was thinking about the IDE, as well.  IBasic Pro's IDE was written in C++. Hopefully, Aurora's IDE will be written in Aurora (primarily for bragging rights and proof of ability.)  However, what I'd like to see most for the IDE is the ability to create plug-ins and wizards.  In MS Visual C++ I've had to use the ActiveX wizard (among others) several times.  Those create nice frame-works.  Converting some of those to Aurora would be very beneficial to others (including myself.)

Don't get me wrong about my questions. I realize these plans would be "eventual".  I definately understand that soon you will have your hands full with a full-time job (we hope) and that this will be a part-time effort.  I don't want to sound like I am impatient.  I'm only asking about the direction Aurora will take.  I am just excited to be a part of this new language.  One that I actually believe in.  I am actually looking forward to converting open source code to Aurora like SQLite.  If Aurora goes in the direction I hope (and you plan) it will eventually become my primary language.


Doc

Quote...looking forward to converting open source code to Aurora like SQLite.

Heh heh, it might take me awhile to gain enough proficiency with a new language and all, but that was one of the very first thoughts (projects) I had in mind for Aurora.  ;D

If you happen to beat me to it though, I wouldn't mind at all.  ;)

-Doc-

Ionic Wind Support Team

October 31, 2005, 08:20:17 PM #2 Last Edit: October 31, 2005, 08:29:11 PM by Ionic Wizard
Don't get me wrong.  Aurora is a language with a C 'like' syntax.  But I am not trying to create a C or C++ clone, there is already enough of those on the market, and in open source.  You will be able to easily convert some C code, at other times it will be a bit more difficult.

For example there are parts of the C syntax I always found confusing for the beginner, such as the use of a comma as a continuance operator.  In C the comma, at times, means 'do this', 'and this'.   Which is overused by programmers, especially in the FOR statetment

//valid C syntax
for(x=0,y=1,z=11,f=1.14 ; x< 100; x++, z--, f=f*5.3)
{
...do whatever
}

I have adopted the C for statment, but not the continuance operator.  So in Aurora the above would be written in a more readable manner:


y=1;
z=11;
f=1.14;
for( x=0; x < 100; x++)
{
  ...do whatever
  z--;
  f=f*5.3;
}


I also allow you to be lazy and forget the parenthesis:

for x = 0; x < 100; x++
{
}

The power of the C for statment is really in the fact that you can create a loop using any data, not just integers like in BASIC.  String processing comes to mind. 


//find the first space character
byte c;
x=0;
for( c =mystring[x] ; c AND c <> " "; x++) { }

if c
//x-1 is the location of the first space
endif


Of course you could do that easier with a WHILE statement, but it was just to illustrate a point.  A more common application might be in using floats (doubles) in your for statement.

for f=1.1; f < 3.0; f+=.1
{
}


Paul.
Ionic Wind Support Team

Steven Picard

I was pretty much figuring a hybrid of Basic and C (and hopefully eventually C++.)  Making a better version of C++ is not always the ultimate goal, either.  A fellow has be trying this with a language called D and still has a way to go.  My idea of Aurora (and correct me if I'm off base, Paul) is to take the average ANSI C source and be required to only convert 20-30% of it and hopefully what needs converting and how to convert it is obvious (that's the key.)  The examples you gave for the for loops is no big deal to convert (as you demonstrated) and is cleaner anyways.  My thoughts are that I like Basic for most development but I like the power of C\C++.  Plus, there is so much source code out there that is not so easily convertable to most Basics (ex. Visual Basic.)  In fact, most C is easier to convert to IBasic Pro than VB.  I think if I could spend a week to 2 weeks converting some popular open source ANSI C code that would not be a bad investment of time (the Aurora library of code could be built up fairly quickly.)  If I did the same thing in VB it would be too much of a headache and is simply not worth it.

Ionic Wind Support Team

You have the right idea.

I like a lot of the C syntax, what I never did like was what was missing.  The same thing that BASIC programmers have enjoyed was always missing in C.  Things like easily working with strings and having the compiler manage the memory.  Or being able to return a structure from a function without having to deal with your own memory management.

The C runtime library is really showing its age too.  Sure the template library helps a bit to bring C into the 20th century, but that is still adding more obfusication to the language. 

So Aurora is a bridge between what I think is good about many languages while trying to avoid the nasties.  Whether it will be widely liked?  Only time will tell.

Paul.
Ionic Wind Support Team

Steven Picard

November 01, 2005, 07:21:38 AM #5 Last Edit: November 01, 2005, 08:30:19 AM by stevenp
Since you are trying to make it comfortable for BASIC programmers as well, I think what will be neat is that translated C code will be much more accessible to BASIC programmers.  It will be cleaner and easier to follow and easier to modify. This will open up a whole new world for BASIC developers, IMO.

As far as future plans go, what are your planning for OO?  Although C++ is powerful when working with classes I hate it, but, I love OO progamming (using advanced OO in C++ is like putting my head in a vice.)  Languages like VB have basic OO which is sufficient for 97% of all programs.  Interfaces can still be implemented and a "kind of" inheritence, as well. You have to do a little bit of trickery to get inheritence working in VB which is a shame (since it's not truly inheritence.)  My guess is, that when it gets to OO for developing a language it can get pretty hairy so I don't know what you have planned.  My assumption is you will not have it initially, but will you support COM from the beginning (like IBPro?)  If so, it's time to get Sapero on board.  ;D

Steven Picard

I wanted to add that although I am really anxious for this language I don't want this effort of yours to become a burden to you.  I really hope it just stays fun.