I thought the main not having to be declared shared was a convenience, which it would be, except that it changes the behaviour of the program because the main wrapper constructs your class if your main isn't shared, meaning that the behaviour of the shared version and 'for convenience of not typing is shared' not shared version are not the same.
Was that your intention?
I'm thinking that if the convenience has a side effect it doesn't warrant the saving of not typing 'is shared'.
Nev
One version.
- Code: Select all
class A
cue init
base.init
print '1'
def main is shared
A()
1
What you have to change if you don't have the is shared convenience to have the same behaviour.
- Code: Select all
class A
cue init
base.init
print '1'
def main
#A()
pass
1
Broken version that doesn't work as intended when thinking the 'convenience' wouldn't change the behaviour.
- Code: Select all
class A
cue init
base.init
print '1'
def main
A()
1
1