The Cobra Programming Language Version 0.2.0 Release Notes 2006-11-16 ------------------------------------------------------------------------------ See also: Cobra\ReadMe.text Cobra\Docs\License.text Cobra\Docs\Introduction.text http://CobraLang.com/ This release is a brand new compiler written in Cobra itself--cobra.exe. It's faster than the old Python one and has several improvements. In this release: == Additions == * Added new $sharp('...') expression which allows literal C# code to be used whereever an expression is expected. This is an escape hatch for any deficiencies in Cobra that haven't yet been addressed. * Added compiler smarts concerning variables that are typed as nilable being non-nil when an if-statement proves it. For example, where you formerly had to write: var _foo as Foo? # ... if _foo .methodThatRequiresNonNilFoo(_foo to Foo) # <-- typecast to non-nil version You can now write: if _foo .methodThatRequiresNonNilFoo(_foo) This also works with "if _foo is not nil" and "if _foo<>nil". It also works with argument and local variables. * Added new -target option with possible values: exe, winexe, lib, module == Changes and Minor Improvements == * The keyword `code` has been renamed to `body`: def addSomething(thing as Thing) require thing.parent is nil body _things.add(thing) thing.parent = nil * Changed `def construct` to `def init`: class Person var _name as String def init(name as String) _name = name * The Cobra compiler can now report more than one error message at a time. == Fixes == * Fixed the if() expression to work with nil: name = if(person, person.name, nil) # inferred type is String? * Fixed a bug regarding generic methods being recognized as their generic parameter type (T) instead of their constructed type (for example, String). * Fixed some miscellaneous, minor bugs. * Fixed missing error checking on method names. * Fixed bug where the compiler would not find properties and methods in ancestor interfaces. * Fixed a bug regarding false errors from the compiler that an expression of a given interface type could not be used where an ancestor interface type was expected. ------------------------------------------------------------------------------