🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Tangent continues.

Published March 24, 2008
Advertisement
In honor of this little tangent I'm taking in doing something useful, I've decided to name the little hobby language 'Tangent' until I can think of something better.

So far I've accomplished quite a bit. Unfortunately the vast majority of that is proving that I am indeed an idiot. The rest is mostly learning enough MSIL to get a vague idea of what's going on and how to use ildasm. Since I'm an idiot, I'm not really doing much planning or anything sane like typing out the bnf ahead of time.

As such I went through 3 quickie underpinning prototypes before getting something vaguely manageable where I'm not trying to define something in terms of itself (methods are the big culprit here really). A fairly insightful reason why first class methods don't exist in a few places; they're kinda weird and sucky.

Since the core idea is based around the type-system, the prototype that worked was based around doing that first. It's got a good start so far. Operations for member/type equality and greater/less than are there. They're not well tested since I'm going to be relying upon .NET types to be the primatives/storage. Something to convert those types into TangentTypes is not done yet so it's pretty much impossible to declare members at the moment (since a member wants a type, which wants a member which...)

And I'm sure there's going to be tons of gotchas in that conversion process. Like string + string isn't actually string.op+... wonderous little tidbits you learn via msil.

and erm, unit test screenshot!
Void < Null - False:FalseVoid < Any - False:FalseAny < Null - True:TrueAny < Void - False:FalseNull < Void - False:FalseNull < Any - False:FalseVoid > Null - False:FalseVoid > Any - False:FalseAny > Null - False:FalseAny > Void - False:FalseNull > Void - False:FalseNull > Any - True:TrueVoid <= Null - False:FalseVoid <= Any - False:FalseAny <= Null - True:TrueAny <= Void - False:FalseNull <= Void - False:FalseNull <= Any - False:FalseVoid >= Null - False:FalseVoid >= Any - False:FalseAny >= Null - False:FalseAny >= Void - False:FalseNull >= Void - False:FalseNull >= Any - True:TrueVoid == Null - False:FalseVoid == Any - False:FalseAny == Null - False:FalseAny == Void - False:FalseNull == Void - False:FalseNull == Any - False:FalseAny == Any - True:TrueVoid == Void - True:TrueNull == Null - True:TrueVoid != Null - True:TrueVoid != Any - True:TrueAny != Null - True:TrueAny != Void - True:TrueNull != Void - True:TrueNull != Any - True:TrueAny != Any - False:FalseVoid != Void - False:FalseNull != Null - False:False
Previous Entry Tangent 1.5
Next Entry ...
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement