ARM syntax and new keywords

Mohamed Bana mohamed at bana.org.uk
Thu Nov 26 13:51:51 PST 2009


Scala does this using

   `type`

You can use a keyword as an identifier if you place it between `.

—Mohamed


On Thu, Nov 26, 2009 at 9:41 PM, Joshua Bloch <jjb at google.com> wrote:

> Neal,
>
> On Thu, Nov 26, 2009 at 12:48 PM, Neal Gafter <neal at gafter.com> wrote:
>
> >
> > This has nothing to do with closures (there is a separate email list for
> > that anyway).
>
>
> Not yet there isn't.  But I hope there will be soon.
>
>
> >  The #"name" syntax was added to give a way of using "exotic"
> > identifiers that would otherwise be disallowed.  For example, if you have
> a
> > method pre jdk7
> >
> >  int foobar(int x) { return x + 1; }
> >
> > and then we add a keyword "foobar" to the language in jdk7, you can still
> > use the identifier "foobar" by modifying the source as following
> >
> >  int #"foobar"(int x) { return x + 1; }
> >
> > This is even possible for package names, though a bit awkward
> >
> >  package #"foobar";
> >
>
> Bit this is hideous!  Worse than explicit type parameters.  We must not do
> anything that actually makes people do this sort of thing.
>
>    Josh
>
>



More information about the coin-dev mailing list