I;m working on a new language.
Think C wuith classes but not the abomination that is C++
It's currently in a private repo right now but the lexer, parser are done and the type checking is coming along well.
I have implemented grand resolution, name collision detection (at all levels), and some precedence with the latter
I'm releasing it to the world by the end of this year. I will keep you all updated.
Is it garbage collected?
so, structs with functions?
OP here: I am of the opinion that the user should have as much control as possible. It aims to be a systems programming langauage (possibly with some bells and whistles to tweak generated code a little more than one could in C, atleast that I amaware of), so in that sense there will be no GC (garbage collection).
It's not just structs with functions. OOP is more than that, polymorphism is more than structs with functions. So runtime has to be thoguht of etc.
I have a Object structure that will be able to support polomorhism for single inheritance along with interface inheritance as well. So yes it will do OOP (but calling OOP "structs with functions" is a little disingenuous as it is more than simply that).
Update on this.
I am working on the tree visitation algorithm now. So basically part of type checking to make sure typed entities that use class type reference classes that are able to be declared - getting rid of loops.
It will only really get to that interesting stuff as soon as I do expression type checking.
As then I can have an example like
int j = obj.k;
class obj
{
static int k = j;
}
So here the type of the variable j is int, that is fine, no further checking as it is a built-in type (if it was a class type then my code from today applies however I am talking about something different here).
What I should actually be doing here is checking the expression. Then evaluating it and see what it refers to, oh a class, then you type check the class including that static entry which also has an expression and then you have to got back. Now visitation is used for a different case, what I might need here is to rather add an additional atrribute known as `mark` (or ready-to-reference), that should be false here for that variable as we are still parsing the expression, then if we loop back and see that the variable's expression is not ready to reference we error. Technically I need not just a visitatio tree (for a differrent example) but also a r-t-r tree as it can have multiple indirections.
A lot of work but I have am idea of what to do. Also I do have a precedence thing added. That is preprocessed in the sense that I don't do it whilst type checking I do it before it starts, it will reshuffle entries as classes, functions, variables (at global level) and also within containers such as classes. This means that the whole precedence of initialization is implicit when I am doing (or todo the abive).
----
The visitation thing is a tad different, I think that is only useful for when you are doing type-of-variable checking (which is what I did today - not avriable expression checking).
I wrote out a lot more, but I should provide a url probably, like to the post itself, I been jotting them down as of late.
Good luck...