Changes between Version 3 and Version 4 of StreamType
- Timestamp:
- 02/02/09 05:18:43 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
StreamType
v3 v4 29 29 * An IEnumerable/Iterable can be used whereever a compatible stream type is expected. 30 30 * The term "compatible" means the same inner type: int* is compatible with IEnumerable<of int>/Iterable<of int>, but not IEnumerable<of String>/Iterable<of String> 31 31 * However, compatibility does not mean that you can use the methods of IEnumerable or Iterable, since these vary between platforms. 32 32 * Streams are an abstract type, so you cannot create them directly with a call on the type such as `int*()`. Instead, use a concrete class such as `List<of>` or `yield` results out of a method. 33 * Streams are defaulted to be empty rather than nil .33 * Streams are defaulted to be empty rather than nil, so you don't have to guard their usage with an "if" statement. You can loop through them immediately. 34 34 * Portability and readability are the main motivations for having streams in the Cobra language. 35 * See also: [http://cobra-language.com/forums/viewtopic.php?f=4&t=216 "Streams" discussion] 35 * See also: [http://cobra-language.com/forums/viewtopic.php?f=4&t=216 "Streams" discussion], TypesOverview