The Cobra Programming Language Version 0.1 Release Notes 2006-05-21 ------------------------------------------------------------------------------ See also: Cobra\ReadMe.text Cobra\Docs\License.text Cobra\Docs\Introduction.text http://CobraLang.com/ In this release: == Additions == * Split the Examples directory into three directories: HowTo, Samples and Reusables. HowTo is a form of tutorial, the Samples are sample programs with meaningful functionality and the Reusables directory contains library-oriented code. Use the source code in HowTo and Samples to learn the language. * Added a command line option for referencing assemblies: "--reference=Some.dll" or "-r=Some.dll" * Added BlindWatchMaker1.cobra to Samples. * Added DeluxePage.cobra to Reusables. == Changes and Minor Improvements == * Removed "object" and "string" as synonyms for "Object" and "String". All classes are capitalized now. * Changed generic syntax to use angle brackets. old: List(of int) new: List The reason is that the use of parenthesis looked like object instantion and would lead to forgetting to put "()" to create an instance of a list or dictionary. The angle brackets (<>) are more distinct. * Changed the reserved words `raise` and `except` to `throw` and `catch`. The word `raise` will be used for events to match .NET terminology. * Allow "is shared", "is override", etc. on the same line as the declaration: def main is shared pass * A trailing comma can appear at the end of a list or dictionary literal: t = [ 'one', 'two', ] d = { 'one': 1, 'two': 2, } * Allow the use of underscores in numeric literals to improve readability. x = 1000000 x = 1_000_000 # obviously 1 million * Cobra now recognizes the "getEnumerator" method when inferring types for for-loops. * Improved the semantics of == to handle characters vs. strings. You can say c=='x' for a `c` that is typed as `char`. * Include the filename in error messages, not just the line number. * The compiler emits a warning if the user declares a method whose first argument is `self`. This is a Python requirement, not a Cobra one. Also, Cobra calls it `this`. * Added SystemInterfaces.cobra for being an explicit, Cobra-based proxy for the System DLL types. You can now add information here without needing the implementation of Cobra. == Fixes == * Improved handling of multiple and nested namespaces. * Fixed the type of string indexing expressions to understood as `char`: c = someString[i] * Fixed a bug in "if inherits" statements where assignments to the variable in question did not take place. * Fixed a bug that prevented saying "implements IEnumerable" * Fixed a bug where specifying an unknown generic type did not emit a proper error message. * Fixed bug when declaring generic classes with more than one argument. * Fixed a bug where an interface declaration could not inherit a generic interface or a qualified interface. * Fixed a bug regarding type casting (a to B). * List and Dictionary are now deemed compatible with IList and IDictionary by the compiler. * Fixed a bug where qualified names could not be the target of the "to" and "to?" operators. * Fixed a bug with enums and comparisons. * Fixed a problem with branch statements that should generate a syntax error. * Fixed a bug where variable names starting with "of" could not be passed in method calls. (Cobra mistook them for the beginning of a generic class.) * Instead of the hard-to-understand error "Expecting a type.", Cobra now says "Expecting an expression." when it is, in fact, expecting one. * New error check: Cannot locate base class BASENAME. * New error check: Method names cannot be the same as their class names, even when starting with a lowercase. ------------------------------------------------------------------------------