Upcoming Release

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Upcoming Release

Postby Charles » Sun Feb 17, 2008 3:49 am

I still need to add How-To's for contracts, winforms and threads. The following are already done and constitute my intermediate release notes (which still need wording and organizational improvements). Questions, comments and feedback are welcome.

I expect to cut the release sometime on Sunday Feb 17th (today).

Upcoming Cobra 0.7.3 Preview:

Characters now have properties which are mapped to the .NET Char static/shared method calls:

Add line continuation character (_). This can be used for any line at all. The next line has to have the same level of indentation or greater. Also, the following line is the one place you can mix tabs and spaces for indentation by using spaces *after* the tabs to line up your continuation line with the one above to suit your taste. If you're using spaces for indentation you can use as many or as few extra spaces for alignment.

Added new -optimize (or -o for short) flag to enable optimizations in the C# backend.

Added new syntax for including sharp code: sharp'...' and sharp"..."

Added SomeType.getType to return the System.Type that implements SomeType at run-time. (C# users know this as typeof(SomeType).)

New ct_trace statement.

-- Refinements

Cobra now gives suggestions for unknown member names.
foo.cobra(4): error: Cannot find a definition for "OSVersion" in "Environment". There are members with similar names including "osVersion", "getOSVersionString" and "version".

Improve naming conventions from reading DLLs. For example, Math.pi instead of Math.pI and Environment.osVersion instead of Environment.oSVersion.

The error message for overriding contracts with "or require" and "and ensure" is more complete. "The contract must be declared "or require" rather than "require" because the code member is "override"."

Improve the error message for a return statement that returns a value in a method not declared to return anything.

-- Bugfixes

* Fixed: Cannot successfully run cobra.exe on Novell Mono on MS Windows

* Fixed: Properties using the shortcut syntax "from var" don't invoke the invariant.

* Fixed: Code in "invariant" expressions can reinvoke the invariant leading to infinite recursion.

* Fixed: An "invariant" condition that is not an explicit boolean expression (such as "name.length") causes invalid code generation.

* Fixed: Cannot instantiate a qualified type name with only one namespace (A.B() fails, A.B.C() works).

* Fixed: The compiler does not correctly recognize that a struct inherits/implements an interface.

* Fixed: Referencing method names in a DLL that start with lowercase letters does not work.

* Fixed: Nested classes in DLLs are not read. This also means that ".controls" cannot be referenced in a subclass of Form in WinForms.

* Fixed: A method with a return type and a single `throw` statement generates a false error message ("Missing return...").

* Fixed: Assigning a method or property that returns a System enum to a local variable causes bad code generation.

* Fixed: Cannot use spaces for indenting doc strings.
Posts: 2510
Location: Los Angeles, CA

Return to Discussion

Who is online

Users browsing this forum: No registered users and 2 guests