Wiki
Show
Ignore:
Timestamp:
11/16/08 21:02:05 (4 years ago)
Author:
Chuck.Esterbrook
Message:

Regarding "truthfulness" such as found in assert, if and if(...), primitive nilable types such as bool? and int? now have their value examined. Previously, simply being non-nil was enough to be true, but that was not intuitive nor consistent with dynamic?.
ticket:5

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cobra/trunk/Developer/IntermediateReleaseNotes.text

    r1767 r1769  
    128128* The default type for vars, properties and method arguments is now `dynamic?`. Also the result type for `d.foo` where `d` is dynamic is now `dynamic?` instead of `dynamic`. These changes reflect the flexibility that was originally intended with default types and dynamic typing. 
    129129 
     130* Regarding "truthfulness" such as found in `assert`, `if` and `if(...)`, primitive nilable types such as `bool?` and `int?` now have their value examined. Previously, simply being non-nil was enough to be true, but that was not intuitive nor consistent with `dynamic?`. ticket:5 
     131 
    130132* Added new `all` and `any` unary operators that take something enumerable (such as a list, set or generator) and return a boolean (true or false) indicating if all or any of the elements are true. These operators increase expressiveness in conditions. For example, a contract might use these operators: 
    131133.code