JK, yes please, break it down in to managble chunks. You have creative ways of solving your challenges. It all might be related to your array feature, but I can see several components that could be solved independantly of each other. Thanks. Maybe have a look at basic-macro branch
which is a branch created by v1ctor that I keep rebasing on to current master. It may give you some new ideas on how to deal with templates (#macro code generators).
Juergen Kuehlwein wrote:So i made it possible. Now TYPEOF() additionally can return the type of a variable in uppercase letters in regular code too. This solves one of my key problems so far. I hope this doesn´t raise parsing abiguities for the compiler or other problems elsewhere. As far as i could test it, it seems to be safe. It was quite easy, so i´m a bit astonished it hasn´t been done before, maybe nobody thought, it could be useful.
Doing this makes compile-time information available at run-time, which might be useful for something like variants (run-time), though storing the data type as a string is not really all that efficient so we would probably look to have some kind of mapping between an integer type and the represented data type. Regardless, should not be needed for generics (compile-time), or in the case of fbc, pseudo-generics, using #macros as templates and code generators. fbc is pretty good at optimizing out constant expressions, though, so depending on usage maybe doesn't matter that an inefficient string representation of the data type is created at compile time. If it must be stored for later use during run-time seems like a bad design.
So, I look at where it's actually being used: and the only place I see is in arrray.bi at #elseif (TypeOf((data)) < "FUNCTION)") and (TypeOf((data)) > "FUNCTION'")
which looks to me a bit of ASCII hackery to know that data is a function ptr.
And this is just one thing that you've added to support the "New array features". So yeah, we will be looking at all the individual pieces to see how they fit in to fbc. They will need to be documented and maintained for years to come.