🎉 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: Milestone 4 - Methods

Published June 20, 2008
Advertisement
Its nice to be able to get back to work after being sick for a few days. Very productive both at work, and at hobby work today. Tangent's Hello World now works:

public static void main(){    print "Hello World";}


Not very impressive, I know. And if I actually had dotNet importing working better, it'd be not very dissimilar from C# Hello World. That is perhaps part of the idea. Keep the syntax, use the libraries, change little bits here and there to allow the mix-in behavior and better function as object usage.


And while it doesn't look very impressive from the 'screenshot' realm, it was a headache and a half to implement. The problem came perhaps from my milestone ordering. I decided to do methods before classes, thinking that "oh, I already have the block parsing done; just add the header stuff and poof!". A nice reminder that poof should cause a violent physical reaction whenever it comes near designs/plans.

Basically, Tangent works like C#. Everything goes into a class. Global methods are fine, but under the hood they too just end up in a static, global class. So under the hood, I needed to implement adding members to classes (which umm, wasn't supposed to be until milestone 5).

And then I kinda realized that all the nice type interaction behaviors that I'd made and tested worked on fully made types, and returned new ones. And a number of the mix-in behaviors are defined in terms of those interaction behaviors... which lead to 'how do you know if it's fine to mix these two, when they're only 1/2 built'. And once that could be solved, it mostly involved keeping nice sane references to types to be filled in later... which is impossible when the code for that returns new ones.

And I need to better test the stuff that's there; make sure that parameter creation works right and eventually non-static methods. Also, Type Expressions aren't dealt with properly as return or parameter types... and overloading/mix-in of all sorts currently just punts. and I need to get around to reworking the actual method invocation (it doesn't nicely support/respect recursion/multi-threading). And I should probably implement the basic operations for basic types so the guy I bounce ideas off of gets off my ass about them [grin]

But hello world works. Woo.
0 likes 1 comments

Comments

rip-off
Telastyn > Hello, World
World > Hello, Telastyn

... and congrats!
June 21, 2008 07:08 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement