Wiki
Version 17 (modified by Charles, 12 years ago)

--

Cobra 0.9.0 Release Notes

Below are highlights for this release. For even more details including every bug fix, browse the revision log. To get Cobra 0.9, visit  Downloads.

Regarding Cobra 0.9.1, this is a minor patch release for Windows-only which enables installing Cobra on .NET 4.5.

Language

  • Enabled multiple test sections in methods and properties.
  • Added new try...catch...get expression.
  • Added support for namespace doc strings.
  • Added unpacking the new Pair classes with assignments and for loops.
  • Throw an UnpackException? for multi-target assignment (target1, target2 = source) if there is a mismatch in the number of source items and targets
  • Enhanced the treatment of == and <> between objects to fall back to a strongly type .equals method if a strongly typed .compareTo method is not available.
  • 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 recognition of the interfaces of primitive types such as int implementing IComparable<of T>.
  • Added proper support for DllImport also known as "P/Invoke".
  • Added local variable creation and type inference for out parameters in method calls.
  • 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.
  • Improved error checking and improved error messages.
  • Fixed various bugs.

Library

  • Renamed "Cobra.Lang" to "Cobra.Core"
  • Added MultiList?<of T> class.
  • Added 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.
  • Fixed various bugs.

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.

Learning

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

Other

  • 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.

Credits

Cobra is a community-driven, open source project under the MIT license. Direct contributions came from, in order of magnitude:

Suggestions and bug reports came from, in alphabetical order):

agustech, blubb, BrendanSimon?, callisto, creadak, DelphiGuy, drissel, dwilliamii, gissolved, hopscc, jaegs, jetimms, jonathandavid, melger, nerdzero, nevdelap, Obtuse, ObtuseAngle?, RIGHT_THEN, terenced, todd.a, torial

Additional people contributed through testing and discussion.

See Also