Cobra Changelog

New in version 0.9.6

December 27th, 2013
  • This version added optional and named parameters, and added modifier sections (e.g. private, shared).
  • The -lib option now supports {EnvironmentVariables} in the path.
  • Error checking was improved.
  • There were also fixes and refinements.

New in version 0.9.2 (November 27th, 2012)

  • Language:
  • Mixins
  • Mixins can now declare protected and private members.
  • Mixins can now be used as proper types, such as the type of a parameter.
  • Fixed: Cannot declare a mix-in inside a namespace.
  • Fixed: Mixins cannot use the from declaration from of properties.
  • The power-to operator as in base ** exponent is now supported.
  • All numeric types work.
  • Augmented assignment (**=) works.
  • For b ** e where both are ints, a negative int value for e will throw an InvalidOperationException. You can address this by casting either to a fractional type (number, decimal, float).
  • Division
  • Added //= for augmented assignment of integers with "integer division". This corresponds to the binary arithmetic operator //.
  • Added error check for using "augmented fractional division" to modify integers:
  • Cannot use fractional division (/=) to modify an integer. Use integer division (//=) instead.
  • Fixed: The operator //= for fractional types does not floor the result like // does, making the two operators inconsistent.
  • Added support for int literals outside a 32-bit range.
  • Inferred types are now int, uint, int64 and uint32.
  • Works for decimal and hexadecimal bases.
  • Added new error check: Cannot raise events for other objects.
  • Don't run the tests of referenced libraries by default.
  • Fixed: Test blocks in generic classes ignored.
  • Library:
  • In CobraCore, added .isRunningOnWindows and .isRunningOnMac.
  • In CobraCore, changed .isRunningOnMono and .isRunningOnUnix from properties to methods.
  • Moved IList.numbered up to IEnumerable.
  • Added .first, .take and .skip extension methods to IEnumerable.
  • Added the overload IEnumerable.numbered(start as int).
  • Command Line:
  • Enhanced -native-compiler to search the system PATH if the specified compiler could not be found by the Process class.
  • In cobra -about, print a warning if Cobra.Core.dll is not found next to cobra.exe.
  • Fixed: cobra -embed-run-time requires write perms to the install directory.
  • The -embed-run-time/-ert option now makes a local copy of Cobra.Core which is removed later.
  • Installer:
  • Support .NET 4.5 (actually released in Cobra 0.9.1)
  • Make the Windows-based install-from-workspace.bat robust against the user's starting directory.
  • Use the environment variables "PROGRAMFILES" and "ProgramW6432" instead of hard coding "\Program Files [(x86)]".
  • Other:
  • Advanced the JVM back-end (could still use open source volunteers).
  • Better reporting of column number in error messages.
  • Updated Notepad.cobra sample to .NET 4.0.
  • Added dump-assembly.cobra command line util in Supplements/.
  • Improvements to the online wiki.
  • There have been concurrent improvements to the MonoDevelop add-in for Cobra, by Ramon Rocha.

New in version 0.9.0 (October 1st, 2012)

  • 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.
  • Added proper support for DllImport also known as "P/Invoke".
  • Added local variable creation and type inference for out parameters in method calls.
  • Improved error checking and improved error messages.
  • Fixed various bugs.
  • 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.
  • LIBRARY:
  • Renamed "Cobra.Lang" to "Cobra.Core"
  • Added MultiList? class.
  • Added Pair and Pair clasess.
  • Improved the default formatting of the trace statement (which is also configurable).
  • Added CobraCore.operatingSystemDescription as 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.
  • Added extension methods:
  • interface IList
  • interface IList
  • class Stack: def clone as Stack
  • class String
  • 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.
  • Kickstarted Cobra Koans.
  • Expanded the wiki.
  • Continued discussion and support in the forums.
  • Added Samples:
  • Notepad for WPF
  • Gtk Source Editor
  • HexDump
  • 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.