well no idea how the lua Code would look like , it depends i guess how that would work in the big scope.
From my point of view its important that the emulator code is as clean as possible because that help you and others to remember how things worked! That makes code easier to maintain AND extend.
as from here:
http://jim-mcbeath.blogspot.com/2008...html#funcsugar
(with reference to here:
http://projects.workingmouse.com/pub...tml/index.html)
you can do extra cool stuff like that:
def compose[A, B, C](f: B => C, g: A => B): A => C = (a: A) => f(g(a))
//looks freakin difficult ( and in detail it may be) but look here:
def plus1(n:Int):Int = n+1
def intToParenString(n:Int) = "("+n.toString+")"
val plus1string = compose(intToParenString,plus1)
val x = plus1string(10) //this executes plus1 and intToParenString, sets x to the string (11)
Note that executing the compose function does NOT execute functions f and g, but rather returns a function object which, when invoked, will execute f(g) on its argument.
Isn't that cool?^^
and another one:
especially features like pattern matching would seem for me ( as emu code "newb") very impressive:
Scala provides out of the box support for pattern matching on:
* constants
* variables (which can be used in the match result)
* constructors
* sequences
* tuples
* types
__________________
yes i have a mac, so what?
Last edited by Shin_Gouki; October 8th, 2008 at 17:33..