my.name['last']
How does the ' operator decide between need for 's and not?
Where is the GitHub page? :-) What did you learn :-) Who are you ?
Nice one
my.name['last']
How does the ' operator decide between need for 's and not?
Where is the GitHub page? :-) What did you learn :-) Who are you ?
Nice one
I am planning on adding additional features like adding statements after each method call with the ':' operator, like this:
# ship.attach_weapons(...):
ship's attach weapons: blasters, rockets, lasers:
print "Eeeekkrrrrgh! Weapons attached successfully!"
print "listing:"
for weapon in *: #all arguments of attach weapons
print "Weapon:", weapon
else:
print "WARNING! WARNING! Ship weaponry attachment FAILED"
print "You're defenseless!"
detach weapons:' ship:
print "Weaponry detached, seek cover!"
else:
print "Weaponry detachment FAILED!"
print " AUTODESTRUCT SEQ. INITIATED"
print " EJECT EJECT EJECT!"
auto destruct: 20s' shipIt doesn't care basically if it's encountering a dict ({}), an object, or a function/method.
If it's not a function then it's either a dict OR another object instance. it it's a function it applies it! Glas treats everything as potential functions or procedures (no arguments) math sin: x could be _anything_ really :)
Use '$' sign if you wish to refer to function's object explicitly like this:
a function name # could be application?
$ a function name # definitely function object to be referred! nevermind: that --> listen: this ~ to
# nevermind(that).listen(this.to)
# All you do is complain and whine to your boss,
# slacking, sipping a lot of coffee at the coffeeshop:
complain: and whine -> my ~ boss -> slack: sip coffee: a lot --> coffeeshop
# my.boss.complain(and_whine).slack(
# coffeeshop.sip_coffee(a_lot)
# )
foo: normal dict['some key'] -> bar
;)I had some kind of a satori Saturday, so it's still just a glas.py file which aims are being a simple as possible translator into Python. (for now it just parses it and evals it like a barbarian, and still not workable ;))
I will make a repo later today, after work.