• entries
    359
  • comments
    237
  • views
    188615

Tangent continues.

Sign in to follow this  

47 views

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:False
Void < Any - False:False
Any < Null - True:True
Any < Void - False:False
Null < Void - False:False
Null < Any - False:False

Void > Null - False:False
Void > Any - False:False
Any > Null - False:False
Any > Void - False:False
Null > Void - False:False
Null > Any - True:True

Void <= Null - False:False
Void <= Any - False:False
Any <= Null - True:True
Any <= Void - False:False
Null <= Void - False:False
Null <= Any - False:False

Void >= Null - False:False
Void >= Any - False:False
Any >= Null - False:False
Any >= Void - False:False
Null >= Void - False:False
Null >= Any - True:True

Void == Null - False:False
Void == Any - False:False
Any == Null - False:False
Any == Void - False:False
Null == Void - False:False
Null == Any - False:False
Any == Any - True:True
Void == Void - True:True
Null == Null - True:True

Void != Null - True:True
Void != Any - True:True
Any != Null - True:True
Any != Void - True:True
Null != Void - True:True
Null != Any - True:True
Any != Any - False:False
Void != Void - False:False
Null != Null - False:False

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now