[Mono-list] Nemerle 0.3.2 released

Michal Moskal michal.moskal at gmail.com
Wed Jun 1 08:22:34 EDT 2005


The new feature-full 0.3.2 version of Nemerle has just been released.

The usual blurb about what is Nemerle can be found at:
  http://nemerle.org/

Download informations are available at:
  http://nemerle.org/Download

The changelog is in the blog:
  http://nemerle.org/blog/archive/2005/Jun-01.html
as well as at the end of this email.

Have fun!


0.3.2, Jun 1 2005
  This version brings a few new features and a bunch of bugfixes.
  About 350 svn commits was done since the last release.

  New features:
    * You can now omit prefixes of variants and enums in matching, for 
      example:
        variant Foo { | A | B }
	match (some_foo) {
	  | A => ...
	  | B => ...
	}
	enum Bar { | A | B }
	match (some_bar) {
	  | A => ...
	  | B => ...
	}
      The restriction is that the type of some_foo need to be
      statically known to be Foo. If type inference cannot guess it
      at this point, you will have to match over (some_foo : Foo) or
      specify Foo.A in the first branch. Same goes to Bar.
      This feature is similar to switches on enums in Java 5.0.

    * Default parameters:
        public DoFoo (s : string, flag1 : bool = true, 
				  flag2 : bool = false) : void
        {
        }
      For boolean, integer and string default value the type of parameter
      can be omitted:
        public DoFoo (s : string, flag1 = true, 
				  flag2 = false) : void
      Only other allowed default value is null:
        public DoFoo (x : SomeClass = null) : void

    * The warning that you should use "FooBar where (...)" instead of
      plain "(...)" is gone. We have found that it was a mistake.
    * Blocks, it is possible to construct a block you can jump out of
      with a value. For example:
	def has_negative =
	  res: {
	    foreach (x in collection)
	      when (x < 0) res (true);
	    false
	  }
      Please consult http://nemerle.org/Blocks for details.
    * Tuples can be now indexed with []. It is only supported with
      constant integer indexes. Indexing starts at 0, so "pair[1]"
      is "Pair.Second (pair)".
    * Nemerle.English namespace now contains "and", "or" and "not" logical
      operators.
    * Macros can now define textual infix and prefix operators (just like
      "and" above).
    * Number literal can now contain _ for readability, for example 
        def x = 1_000_000;
    * Lazy value macros http://nemerle.org/Lazy_evaluation
    * Automatic get/set accessor generation http://nemerle.org/Accessor_macros
    * mutable can now define more than one variable:
        mutable (x, y) = (42, "kopytko");
        x++; y = "ble";
        mutable x = 3, y = "kopytko"; // the same
      The second version does not work inside "for (here;;)".
    * Arrays are no longer covariant. They haven't been in 0.2 days,
      and we have found it to be causing problems with type inference
      (see #442).
    * Tuples and lists are now serializable. Variants are deserialized
      properly.
    * Code can be entered at the top level, without a class and the Main
      method. So the classic example becomes:
        System.Console.Write ("Hello marry world!\n");
      That is, it put alone in the file will just compile. You can define
      classes, issue using declarations before the actual code. You can also
      define local functions with def (which gives you type inference).
      Yeah, we know this is only useful in write-once-run-once-throw-away
      kind of programs and testing, but it is nice anyway :-)

    * The CExpr compiler stage has been removed, which means that a/ we are
      more likely to implement generics soon, b/ we generate better code
      overall. Especially matching has been benchmarked and improved.
    

  Bugfixes:
    * Overload selection rules have been improved, especially in presence
      of var args, parametric types and named parameters.

    * #142: default parameters
    * #303: indexing operator on tuples
    * #351: Assigning to generic type's field does not yield its type's 
            argument specialization
    * #387: Exhaustiveness check of tuple patterns with variants is 
            exponential
    * #401: cannot define macros on assembly
    * #408: Do not create delegate proxy for instance methods
    * #409: Omitting the prefix when matching variants
    * #410: overload selection rules
    * #419: Logic operands in plain English
    * #422: _ in number literals
    * #426: macros assigned to local identifiers
    * #428: macros for lazy values
    * #434: /*\n Hang emacs
    * #437: Define more than one variable in the for( ; ; ) construct 
            - extend mutable definition
    * #438: Destroy CExpr stage
    * #440: bogus error messages about meanings of the module
    * #442: code generated for arrays forgets inferred type and crashes
    * #443: Wrong computation order when assigning the return value of a 
            function to a field during field declaration
    * #444: assertion in Typer2 when ignoring value
    * #445: delayed typings does not work on lhs of =
    * #447: Closurising caught value causes invalid IL
    * #449: implementing interfaces vs object subtyping
    * #451: -r:Nemerle.Compiler.dll
    * #453: Tuples are not serializable
    * #454: the ::= operator
    * #455: no warning for uninitialized members of struct
    * #456: Trying to escape block label crashes compiler
    * #457: Optional macro syntax extension not working
    * #458: Nemish fails to load profile.
    * #459: windows ncc.exe Url error
    * #463: matching compiler should use gotos not switches
    * #464: serialization and singleton pattern for variant options
    * #465: Unable to infer common type when there is also common interface
    * #467: get rid of TExpr.TailCall
    * #469: DecisionBuilder crashes on counterexample building
    * #470: inference for default parameters
    * #471: type inference does not work for enforcements
    * #472: preprocessor directive handling broken
    * #473: _ shouldn't be allowed in global types

      
-- 
   Michal Moskal,
   http://nemerle.org/~malekith/


More information about the Mono-list mailing list