Wiki

Changes between Version 4 and Version 5 of RubyLanguage

Show
Ignore:
Timestamp:
08/19/09 09:25:16 (15 years ago)
Author:
Chuck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • RubyLanguage

    v4 v5  
    1212 
    1313Although Ruby is not Python, Ruby users may glean some characteristics of Cobra by reading [PythonLanguage comments about Python], which are more detailed. 
     14 
     15== Commonalities == 
     16 
     17 * High level syntax 
     18 * Garbage collected 
     19 * Dynamic binding 
     20 * Blocks 
     21 * Productive languages 
     22 
     23== Differences == 
     24 
     25Cobra has: 
     26 * Optional static typing, which 
     27   * Adds additional error checking 
     28   * Improves performance 
     29   * But may by overly restrictive in some cases 
     30   * The choice is yours. 
     31 * First class support for unit tests 
     32   * Very lightweight syntax 
     33   * Informative `assert` statement 
     34   * A test is co-located with the method it tests for the benefits of 
     35     * Easier maintenance 
     36     * Documentation 
     37     * Less file switching during development 
     38 * First class support for contracts 
     39   * Lightweight syntax 
     40   * Contracts are inherited -- Supports OOP 
     41   * Can complement unit tests as a quality control feature 
     42 * Programs are compiled even when run in one shot with "cobra myprog.cobra" 
     43   * Performance can be up to hundreds of times faster than Ruby depending on the program. 
     44 * Native threads 
     45   * No thread simulations, interpreter lock, etc. 
     46   * Scale up to the number of cores in your machine. 
     47 * Strings 
     48   * Ruby has mutable strings and immutable symbols 
     49   * Cobra has immutable strings and mutable StringBuilder 
    1450 
    1551== Code Examples == 
     
    75111 
    76112 * OtherLanguages 
     113 * LanguageTopics 
    77114 * HowToPrograms 
    78  * PythonLanguage