Experimental version of trans now up!

Monkey Forums/Monkey Programming/Experimental version of trans now up!

marksibly(Posted 2011) [#1]
Hi,

I've just uploaded an experimental version of trans (Windows only sorry) that features some fixes for strict mode and/or abstract methods.

Due to a minor plumbing related adventure (that should be resolved soon) I haven't been able to test this as thoroughly as I would have liked, but thought it was probably worth uploading as an experiment anyway as it features a semi big/dangerous change.

The main addition is that you should now be able to leave out 'unreachable' return statements in strict mode.

Strict

Function Test:Int( x? )
	If x
		Return 1
	Else
		Return 2
	Endif
	'Note: no return required here!
End

Function Main:Int()
	Print Test( True )
	Print Test( False )
	Return 0
End


My fear is that some targets (in particular Flash) may still complain, but all my tests compile/run fine so hopefully not.

Anyway, if you're a strict mode user (or just the adventurous type) please give this a whirl and let me know if you have any problems (or not).


GfK(Posted 2011) [#2]
You git! After i just spent ages shoving return statements everywhere! :)


marksibly(Posted 2011) [#3]
Eek! Sorry!


wiebow(Posted 2011) [#4]
Interesting Mark. I will try some code over here to test.

@Gfk: not using a repository with version management? ouch.


GfK(Posted 2011) [#5]
@Gfk: not using a repository with version management? ouch.
Yep, but i've done two days of coding on top of all the return statements being added. :P

Oh well, at least my code works.


Yahfree(Posted 2011) [#6]
Thanks Mark, I'll give it a try.

@Gfk -- Free typing exercises?


Yahfree(Posted 2011) [#7]
Reporting back. This fixed my bug with Abstract methods and Java! Thanks Mark!! Also taking out the extra return methods in redundancy worked as well!


invaderJim(Posted 2011) [#8]
Yay, Box2D compiles in xna again!


Jesse(Posted 2011) [#9]
:(