Wiki

Changes between Version 6 and Version 7 of TypesOverview

Show
Ignore:
Timestamp:
02/02/09 05:24:17 (16 years ago)
Author:
Chuck
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TypesOverview

    v6 v7  
    4747     * obj1 = t() 
    4848     * obj2 = t(0, 0) 
     49 * Generics 
     50   * Classes, interfaces and structs can all be generic--parameterized by type. 
     51   * These are identical to .NET generics as found in C# and VB. 
     52   * Examples: List<of int>, List<of String>, Dictionary<of String, int> 
     53   * The general form is: Name<of T, U, ...> 
     54   * You can declare your own 
     55   * You can overload by number of type arguments. In other words, Foo<of T> and Foo<of T, U> are two different types. 
     56   * Methods can be generic: def foo<of T>(a as T, b as T) 
    4957 * See also 
    5058   * [http://cobra-language.com/forums/viewtopic.php?f=4&t=291 Discussion on types] 
    5159 
    52 TODO: arrays, passthrough, vari, typetype, generics, local var type inference, greatest common denominator 
     60TODO: arrays, passthrough, vari, typetype, local var type inference, greatest common denominator