On Tue, Jul 8, 2008 at 8:38 AM, Landei <
Daniel.Gronau@...> wrote:
frapas wrote:
>
> I think that the impossibility to specify operator
> precedence/associativity
> could be an obstacle.
>
yes
I hope this will be implemented in future Scala releases.
Any prevision ?
It could be a great feature and with the ability to implement foreign languages syntax in Scala it will be easiest to port chunk of code and library from different languages to Scala.
> I'm, for example, interested in the possibility to create a language with
> syntax similar to perl6.
>
> The operators are:
> http://dev.perl.org/perl6/doc/design/syn/S03.html
> in particular:
> ~ string concatenation (coerce numbers to string)
> ~~ for regexp (through external library, I know Scala has not regexp)
> math operator (+-*/ ecc ) coerce strings to numbers
>
> Do you think it's possible ?
>
I think you have to make some compromises :-)
There was a good article about operators at Code Commit:
http://www.codecommit.com/blog/scala/implementing-groovys-elvis-operator-in-scala
Very interesting !
thanks
Francesco