[nem-en] Nemerle 0.2.0 released

Michal Moskal malekith at pld-linux.org
Mon Sep 13 17:26:39 CEST 2004


On Sun, Sep 12, 2004 at 07:28:47PM -0400, mike roome wrote:
> >    * New cool string interpolation feature -- the `$' operator is now
> >      shorthand to Nemerle.IO.sprint, example usage:
> >
> >    def x = 40;
> >    def y = 42;
> >        System.Console.Write ($ "$(x + 2) == $y\n")
> >
> >      Any expression can be used in $(...), but there might be problems
> >      with embedded strings and so on. It is meant to be used with simple
> >      expressions like array/field access, method call and so on.
> 
> Great idea. However, the print/sprint macros have a small problem -
> there's no way (afaict) of using a literal $ in them (well, you can do
> $('$'), (or even $(\"$\"), it seems), but that's.. inelegant). I've hacked
> up a tiny patch that adds $$ as an escape for it (that is, $"total:
> $$$total" == "total: $" + total.ToString();)

Applied, thanks!

> (hopefully the patch is in an ok format, i've never been too sure of what
> the right way to send patches is...)

Almost :-) Final newline character was missing.

-- 
: Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++
: ::: Logic is a nice contrast to the Real World. :: UL++++$ C++ E--- a?




More information about the devel-en mailing list