Jump to content

moonscript transpiler


ChrisMAN
 Share

Recommended Posts

OO is kind of wierd. It uses prototypical inheritance through metatables. Classical inheritance is more obvious. Mixins an duct typing are kind of the preferred OO model in scripting languages any ways.

 

I am a professional ruby developer. That is probably what makes me cranky. Ruby is such a joy to code in. I can't seem to get anything meaningful on one line. I miss good built in iterators. I havnt had to do much string manipulation yet but it looks really ugly. I am sitting at about 1500 lines of lua at the moment which would have been 600 lines of clear ruby. At least its not 5000 lines of c++.

 

The things i have run into it so far.

 

Arrays start at 1

cant return early w/o a hack

really annoying to check false vs nil

global variables by default

no self asignment operators

no ternary operators

mixins + metatables

break/continue is borked

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...