Questions (various) regarding Monkey X Pro.

Monkey Forums/Monkey Beginners/Questions (various) regarding Monkey X Pro.

paulscottrobson(Posted 2014) [#1]
Hi. I am interested in Monkey. I have some questions that I can't answer without purchasing or aren't addressable.

1) The product seems to be almost a one man show, Mr Sibley. I have no problem with this indeed I have used Blitz before, but what happens if (god forbid !) he was run over by a bus tomorrow ?

2) How well does the Android/iOS build process work ? Does it require all kinds of fiddling to get apps with adverts built, or do things like brl.admob and the upcoming (apparently) iAds version just do it automatically. (AFAICS you can't try before you buy ?)

3) The constructor chain seems broken. If you declare a constructor, in a subclass it seems that you need to redeclare it and call the constructor manually. Are there plans to fix this, or is it being left because of backwards compatibility ? Could another approach be used to inherit constructors ?

4) Can MonkeyX class methods return self, so you can chain them ? (this would be a sort of fix for 3)


Goodlookinguy(Posted 2014) [#2]
1) Really?

2) ...

3) Not sure what you're talking about. Extended classes inherit the default constructor New() with no parameters which exist in every class you make no matter what. For overloaded constructors you have to do it manually.

4) Yes it can with the code "Return Self"

Edit: Let me elaborate on number 1. Do you let all purchasing decisions depend on whether or not the guy running the show dies? There are tons of small projects out there, especially on a site like Kickstarter. People don't go there and not back something because they think, "hey, that guy might die before he can finish."


therevills(Posted 2014) [#3]
1) The product seems to be almost a one man show, Mr Sibley. I have no problem with this indeed I have used Blitz before, but what happens if (god forbid !) he was run over by a bus tomorrow ?

Yes the main code base is by Mark, but MonkeyX is open source so in theory someone could take over it.

2) How well does the Android/iOS build process work ? Does it require all kinds of fiddling to get apps with adverts built, or do things like brl.admob and the upcoming (apparently) iAds version just do it automatically. (AFAICS you can't try before you buy ?)


For Android you need to install the Android SDK and configure it, for iOS you need a Mac and XCode (and a dev license to test it on an actual device). Brl.admob is pretty easy to use check out the tutorial here:
http://www.monkeycoder.co.nz/Community/posts.php?topic=5695&post=64301

3) The constructor chain seems broken

Could you give a code example?

4) Can MonkeyX class methods return self, so you can chain them ?

Yep, quick example:



paulscottrobson(Posted 2014) [#4]
Excellent - thank you both very much.

The constructor thing refers to constructors with parameters e.g. (apologies for error in syntax, I'm only a beginner at Monkey :) )

class Someclass
Method new(startStuff:Int):Int
; do stuff
End
End

class SomeotherClass extends SomeClass
end

new SomeotherClass(42) doesn't work - it produces a method not found error or something like that. You can define it and user Super, but it seems slightly counter-intuitive


Goodlookinguy(Posted 2014) [#5]
--forum bug repeated my post


Goodlookinguy(Posted 2014) [#6]
Like I mentioned above, the only one that is chained (maybe I worded it oddly) is the default constructor New() with no parameters. For overloaded constructors, your example for instance, you have to manually refer back to the parent constructor overload.


Goodlookinguy(Posted 2014) [#7]
-- ... the forum tripled my post ... really? Why does this forum not use an SQL update?


ziggy(Posted 2014) [#8]
@paulscottrobson: In Monkey, constructors are an exception and they do not support overriding of previous constructors, as they're executed in a sort of chain, from the first ancestor to the actual inheritance member being instantiated. The constructor chain is invoked by using the non-parameters version of New of all inheritance chain. You can still call Super.New(whatever-arguments-here) if you wish, as the fist sentence in the constructor, so specify an argument based constructor instead of the built in parameterless version.

This prevents things to get broken if you forget to call the super.New in any object constructor, but it also makes it a bit inconvenient to maintain a complex parametrized constructor for all objects of the same kind.

Sample:
Function Main()
	Print "Creating a C instance:"
	New C
	Print "Creating a A instance with an argument:"
	New A(34)
	Print "Creating a B instance with an argument:"
	New B(45)
End
Class A
	Method New()
		Print "   Creation of A"
	End
	Method New(value:Int)
		Print "   Alternative creation of A"
	End
End

Class B Extends A
	Method New()
		Print "   Creation of B"
	End
	Method New(value:Int)
		Print "   Alternative creation of B"
	End
End

Class C Extends B
	Method New()
		Print "   Creation of C"
	End
End


Also, if the call to Super.New is the first sentence of another constructor, you can tell which version of the ancestor constructor is meant to be called in the chain of constructor calls


paulscottrobson(Posted 2014) [#9]
Thank you - that explains it. It's a bit different, but I can see the advantages.


Gerry Quinn(Posted 2014) [#10]
Just on the subject of AdMob, I only have experience with banner ads on Android, but they are as simple as they could possibly be.

With regard to the one-man show element, I take the view that it depends on your time horizon. If that's under five years, then code doesn't decay and the community will keep stuff working. If you need a toolset that is guaranteed to be actively maintained in ten years, C++/Java might be your best bet. Or COBOL. But backward compatibility will hopefully be such that Monkey / mojo would remain perfectly usable even then, even if support ended tomorrow. I believe Steam recently approved a game written in QBasic!


paulscottrobson(Posted 2014) [#11]
It's fine with it being Open Source. Obviously Mr Sibley controls it, but if something were to happen it could be maintained, even if not enhanced.


TeaBoy(Posted 2014) [#12]
What if Google were attacked by aliens therefore no more Android updates, then what?


paulscottrobson(Posted 2014) [#13]
Relying on a one man band, or indeed a very small team can be problematical.

People sometimes have to stop for reasons they cannot control. If someone who worked for Google was incapacitated it wouldn't affect the development very much, however good they were. Hopefully of course Mark Sibley will carry on for a while yet !

The product being open sourced solves the vast majority of these problems.