Changes between Version 12 and Version 13 of RubyLanguage
- Timestamp:
- 11/28/10 09:42:02 (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
RubyLanguage
v12 v13 20 20 * Dynamic binding 21 21 * Blocks 22 * Productive languages22 * Productive features 23 23 * Easy construction and use of maps (dictionaries) and arrays (lists) 24 24 … … 40 40 * First class support for contracts 41 41 * Lightweight syntax 42 * Contracts are inherited -- Supports OOP42 * Contracts are inherited -- supports OOP 43 43 * Can complement unit tests as a quality control feature 44 44 * Programs are compiled even when run in one shot with "cobra myprog.cobra" … … 65 65 #!cobra 66 66 class A 67 def main is shared68 for arg umentin CobraCore.commandLineArgs69 print arg ument67 def main 68 for arg in CobraCore.commandLineArgs 69 print arg 70 70 }}} 71 71 … … 103 103 #!cobra 104 104 class A 105 def main is shared106 for arg umentin CobraCore.commandLineArgs[1:]107 print arg ument105 def main 106 for arg in CobraCore.commandLineArgs[1:] 107 print arg 108 108 }}} 109 109 … … 146 146 Cobra: 147 147 {{{ 148 #! python148 #!cobra 149 149 obj = SomeClass(arg1, arg2) 150 150 }}}