FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

August 16th - an EXCEPTIONal day

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Wed Aug 16, 2006 10:23 pm    Post subject: August 16th - an EXCEPTIONal day Reply with quote

I just had to make that pun. Sorry.

I DID EXCEPTIONS AND YOU CAN THROW THEM FROM NATIVE OR SCRIPT CODE AND THEY CAN BE CAUGHT FROM NATIVE OR SCRIPT CODE OMG OMG OMG

I think it's pretty cool. As long as you follow the rules (your exception must be or be derived from MDException, and must also hold an MDValue with the MiniD compatible exception object), it's wonderfully seamless.

I'm so happy I could.. spit. Or something like that. And all the exception code amounted to very little indeed - ~40 lines for all 6 exception opcodes, ~30 lines for the stack unwinding, and.. some small changes to the MDException hierarchy (now it's just MDException, and from it, MDCompileException). That's it.

Also did some cool stuff - I made an MDTable ctor for native code, so you can write table constructors almost as easily as in MiniD code. Like so;

Code:
MDClosure func = ...;

MDTable tab = new MDTable(
   "foo", 5,
   "bar", 7.6,
   "baz", func);


So the params are interpreted as pairs, with the first being the key and the second being the value. I plan on doing something similar for MDArrays.

This is so awesome.
Back to top
View user's profile Send private message
csauls



Joined: 27 Mar 2004
Posts: 278

PostPosted: Sat Aug 19, 2006 12:24 am    Post subject: Reply with quote

Sweetness. I might have to look at your methods soon as I'm about to attempt to set up exceptions ("error raising" by lingo) for scripts in a side project of mine... Maybe we could swap notes a little. Smile MiniD is really impressing me.
_________________
Chris Nicholson-Sauls
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group