Originally Posted By: Pappenheimer
Question:
Where would you place Lite-C and where Lite-C Foundation?

So first of all, its Lite Foundation and not Lite-C Foundation as its not an exclusive Lite-C project wink [/wise guy]

To answer the question, Lite-C as being a subset of C89 is placed in the "Procedural programming". Lite Foundation tries to bring C and thus also Lite-C to the next "level", the "object oriented programming".
This is the work made by the Lite Foundation runtime as it allows you to define classes and create instances so you have objects that you can work with, rather than just functions and a global set of variables.

However, if you count the whole acknex foobar to Lite-C, then Lite-C is half procedural and half object oriented. The whole ENTITY stuff and such with its functions like ent_create() ent_do_something() etc is completely object oriented while the normal program flow is usual procedural.


Its btw time for a new update, this time its just the default library but I think its pretty awesome as it brings two new objects and proves Uhrwerks "no polymorphism" wrong.

The first new object is the LFSetRef, a basic hash table implementation that works based on prime numbers and such. As with every hash table, its pretty hard to iterate through it and at this place the second new objects kicks in; LFEnumeratorRef.
The LFEnumeratorRef is a wrapper class to allow enumerating of _every_ collection class, read: When I add an array class, it can be enumerated in the very same way! Likewise, if you create an array class, it also works with your arrays the very same way.

Now some of you will say "this is garbage, its impossible unless you restrict the way collection classes are build" and I can tell you "its true and you are free to build you collection class in whatever way you want".
Like I said, the LFEnumeratorRef class is a wrapper, it wraps the LFEnumerator protocol. So for every class that wants to be enumerated using a LFEnumeratorRef object, the class must implement the protocol and one simple function: "give me the next n objects".

Here is a short example to show how easy the LFEnumeratorRef is:
Code:
LFEnumeratorRef enumerator = LFEnumeratorCreate(someObject);
LFTypeRef object;
 while((object = LFEnumeratorNextObject(enumerator)))
 {
 	// Do something with the object
 }




The release also contains two bug fixes; The LFString class used a local variable called "result" in the hash and equal functions, the Lite-C compiler never said anything about this and compiled the code just fine, but the result of the functions were pretty random.
It took me a while to figure out why my LFSetRef test scripts never worked in Lite-C (they make heavy use of both functions).


The download link is still the same; http://www.widerwille.com/litefoundation/litefoundation.zip


Time to work on the promised demo, it will sadly require A7/A8 pro or ANet, but I guess most users here have both of it? Oh and no, its not a multiplayer demo.
EDIT: Ah darn, looks like I first need to write a class that allows HTTP requests other than just stupid HTTP POST... Oh well...
In the meantime; any heretic questions left? tongue


EDIT: I made a horrible mistake while copy'n'pasting some of the LFSetRef's code around to get it working with the Lite-C compiler, calling LFCopy() with an LFSetRef as receiver will fail in a way that the buckets aren't copied! This will certainly crash the program when you the function so please; Redownload Lite Foundation!

Last edited by JustSid; 04/23/11 22:53.

Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com