Version 11 (modified by Charles, 9 years ago)


Cobra 0.9.0 Release Notes

Since the last release there are almost too many improvements to list. You can browse the revision log online if you care too.

Some highlights just from the last few months include:


  • Support multiple test sections in methods and properties.
  • Added new try...catch...get expression.
  • Throw an UnpackException? for multi-target assignment (target1, target2 = source) if there is a mismatch in the number of source items and targets
  • Support unpacking the new Pair classes in assignments and for loops.
  • Enhance the treatment of == and <> between objects to fall back to a strongly type .equals method if a strongly typed .compareTo method is not available.
  • New warnings
    • Do not use the identity operator "is" with an object literal. Use an equality operator such as "==" or "<>".
    • Cannot cast a string to a numeric type. Consider using "int.parse" or "int.tryParse". Use "@help int" for details.
  • Added support for namespace doc strings.
  • Added numeric literals like 45n for number and 45d for decimal. Previously, the d suffix required a decimal portion (45.0d) and there was no n suffix available.
  • Added proper support for DllImport also known as "P/Invoke".
  • Added recognition of the interfaces of primitive types such as int implementing IComparable<of T>.
  • Just like assignment can create a local variable (i = 0), an out parameter in a method call can also create a local variable with an inferred type.
  • Improved error checking and improved error messages.
  • Bug fixes.


  • Renamed "Cobra.Lang" to "Cobra.Core"
  • New MultiList? class.
  • New Pair<of TA, TB> and Pair<of T> clasess.
  • Improved the default formatting of the trace statement (which is also configurable).
  • Added CobraCore.operatingSystemDescription as String.
  • Added extension methods:
    • interface IList
      • def addRange(items as System.Collections.IEnumerable)
    • interface IList<of T>
      • def addRange(items as IEnumerable<of T>)
      • def pop as T
    • class Stack<of T>: def clone as Stack<of T>
    • class String
      • def before(sep as String) as String
      • def after(sep as String) as String
      • def count(substring as String) as int
      • def limitLength(maxLength as int, suffix as String?) as String
      • def repeat(times as int) as String
      • def splitWords as List<of String>
  • Added CobraCore.htmlDecode, .urlEncode and .urlDecode.
  • Improved CobraCore.findCobraExe (changset:2473).
  • A Cobra.Compiler library is now always provided during installation.
  • Renamed "CobraInfo?" to "CompileTimeInfo?" and added .date and .subversionRevision.
  • Bug fixes.

Command Line

  • Command line: -native-compiler: The absolute path to the native compiler is no longer required. A simple "csc.exe" or "dmcs" will suffice if it is in the system PATH.
  • Added -clr-platform option (like C#'s -platform option).
  • For "cobra -about", show the path that cobra.exe comes from.


  • Added new How To: Customize Object Equality.
  • Added new samples
    • Notepad for WPF
    • Gtk Source Editor
    • HexDump
  • Kickstarted Cobra Koans.
  • Expanded the wiki.
  • Continued discussion and support in the forums.


  • Added support for .NET 4.0.
  • Improved the output of the @help directive.
  • Improved the installer in numerous ways.
  • Expanded the test suite.
  • Advanced the JVM back-end (could still use open source volunteers).
  • Bumped the Mono requirement from 2.4 to 2.6 based on a survey about VM versions.

See Also