Changes between Version 6 and Version 7 of TypesOverview
- Timestamp:
- 02/02/09 05:24:17 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TypesOverview
v6 v7 47 47 * obj1 = t() 48 48 * 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) 49 57 * See also 50 58 * [http://cobra-language.com/forums/viewtopic.php?f=4&t=291 Discussion on types] 51 59 52 TODO: arrays, passthrough, vari, typetype, generics,local var type inference, greatest common denominator60 TODO: arrays, passthrough, vari, typetype, local var type inference, greatest common denominator