So either I'm making a monumental number of mistakes, or I've finally spent enough time in the programming world to really grok how languages work under the skin. Either way, the last time I did a language (a simple scripting language) it took a lot more effort and stress.
I'm sure you're all on the edges of your seats waiting to find out what tuples look like in Epoch. Well, here you go - a nice shiny example program from the upcoming Release 4 distribution:
//// TUPLES.EPOCH//// Simple demonstration of how to use tuple types in Epoch//tuple demotype : (integer(intvalue), string(strvalue))entrypoint : () -> (){ demotype(test, 0, "") assign(test, foofunction()) debugwritestring(cast(string, readtuple(test, intvalue))) debugwritestring(readtuple(test, strvalue))}foofunction : () -> (integer(intvalue, 0), string(strvalue, "")){ assign(intvalue, 42) assign(strvalue, "test")}
There's a few odds and ends left to polish up (you can't do much with tuples aside from read values out of them; equality comparisons don't work yet, for example) but the bulk of the grunt work is finished.
The next phase is to implement structures. As I noted before, the main difference between a tuple and a structure in Epoch is that a structure is automatically padded, whereas a tuple is automatically packed. (That, and structures will use the structure keyword instead of the tuple keyword.)
Once that stuff is done, I'll be making a last pass over the code to take care of some assorted TODOs and improving a handful of error messages. (It's not really useful to have your program die with the cryptic "Not implemented" error, for instance.)
For now, though, I'm just stoked that the basics of tuples are all in place. I'm also quite tired, and I need to quit staying up late to hack on this project. It's just too much fun [grin]
When you say structures do you mean structs/records/packages? I always thought you meant complex data structures like dictionaries and lists when you said structures hehe.
If so then another difference between the structs and tuple would be that structs have labels while tuples do not.
Finally, languages like Cyclone and BitC might be good inspiration for the type of low level but safe memory management you want.
Finally, Finally, since you may well end up with a language that targets native code you may be interested in C--.