123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- RAKU is a scripting language that resembles Engish somewhat.
- However it is a stealth lisp with smalltalk like semantics.
- In Lisp you would say (function1 arg1 (function2 arg2))
- In C you would write function1(arg1, function2(arg2));
- In Raku you will write function1 arg1 be function2 arg2 so
- attack the greater green gorgon with the large axe
- This is unambiguous in IO or Potion:
- OBJECT METHOD1(ARG1_1, ARG1_2, ...) METHOD2(ARG2_1, ...) METHOD3 EOL
- METHOD3 METHOD2(ARG_2_1, ...) METHOD1(ARG1_1, ARG1_2, ....) OBJECT
- Bob name append(" and ", Jane name) println
- println append(" and ", name Jane ) name Bob
- println append of " and " with name Jane end name Bob
- println and append " and " with name Jane and name Bob
- Bob hp decrease(Bob hp times(10) divide(Bob hpmax))
- decrease(divide(hpmax Bob) times(10) hp Bob) hp Bob
- decrease tally divide of hpmax Bob end times tally 10 end hp Bob end hp Bob
- decrease tally divide tally hpmax Bob end and times tally 10 end and hp Bob end and hp Bob
- decrease(hp(Bob), divide(times(hp(Bob), 10), hpmax(Bob)))
- #
- decrease hp of Bob by call divide call multiply hp of Bob by 10 end with hpmax of Bob end
- set newhp to hp of Bob
- multiply newhp by 10
- divide newhp by hpmax of Bob
|