Cobra Release 0.7.2
Cobra 0.7.2 adds multiple integer types (int64, uint16, etc.), includes better setup instructions for Windows and fixes a handful of bugs.
Language Improvements
Multiple Int Types
Added initial support for the different int types: int8, int16, int32, int64, uint8, uint16, uint32, uint64. The types int and uint are still available and still the most common way to refer to integers.
class X
def main is shared
# you can typecast a literal to force the type:
x = 1 to int64
print x
def compute(x as int64, y as int64) as int64
pass
Miscellaneous
Windows Install Instructions
Added more instructions for installation/setup in the Windows distribution. (Users of Unix-like systems already had instructions and an install script.)
Fixes
- Fixed: On Windows, cannot run cobra on a non-C: drive.
- Fixed: Decimal and float literals cause the compiler to choke if the user's culture does not use '.' for a decimal separator.
- Fixed: The "in" and "not in" operators cannot be used on IEnumerable and IEnumerable<of T>.
- Fixed: The results of a for-expression cannot be assigned back to the list variable it works on. Example:
words = for word in words where word.trim.length
- Fixed: Inside of an if-inherits statement, you cannot "back up" the type of that variable with an assignment statement (the compiler will give a false error message).
if node inherits SpecialNode
node = node.parentNode # where .parentNode returns a Node