Wiki

Changes between Version 12 and Version 13 of RubyLanguage

Show
Ignore:
Timestamp:
11/28/10 09:42:02 (14 years ago)
Author:
Charles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RubyLanguage

    v12 v13  
    2020 * Dynamic binding 
    2121 * Blocks 
    22  * Productive languages 
     22 * Productive features 
    2323 * Easy construction and use of maps (dictionaries) and arrays (lists) 
    2424 
     
    4040 * First class support for contracts 
    4141   * Lightweight syntax 
    42    * Contracts are inherited -- Supports OOP 
     42   * Contracts are inherited -- supports OOP 
    4343   * Can complement unit tests as a quality control feature 
    4444 * Programs are compiled even when run in one shot with "cobra myprog.cobra" 
     
    6565#!cobra 
    6666class A 
    67         def main is shared 
    68                 for argument in CobraCore.commandLineArgs 
    69                         print argument 
     67        def main 
     68                for arg in CobraCore.commandLineArgs 
     69                        print arg 
    7070}}} 
    7171 
     
    103103#!cobra 
    104104class A 
    105         def main is shared 
    106                 for argument in CobraCore.commandLineArgs[1:] 
    107                         print argument 
     105        def main 
     106                for arg in CobraCore.commandLineArgs[1:] 
     107                        print arg 
    108108}}} 
    109109 
     
    146146Cobra: 
    147147{{{ 
    148 #!python 
     148#!cobra 
    149149obj = SomeClass(arg1, arg2) 
    150150}}}