

Functional Programming, from Java to Scala, D. Wall - gtani
http://www.artima.com/weblogs/viewpost.jsp?thread=306337

======
Robin_Message
You can improve on the matching example by adding the line:

    
    
        implicit def string2regexTest(s:String)=new RegexTest(s)
    
        //Now we can just do
        someString @= /regularExpression/
    

which lets you use @= as you use ~= in Ruby.

This looks sort of evil à la monkey-patching, but it isn't nearly as bad as
the compiler will complain if more than one implicit ever matches, which
prevents the situation where something is redefined under you. This is
definitely a good thing Scala has going for it that Ruby doesn't.

------
Nycto
The article complains about Scala lacking Open Classes:

    
    
        Open classes let you add features at runtime. [snip] It's 
        the kind of thing that would be driving programmers nuts by
        the end of a 20-year maintenance cycle. But it's a godsend 
        when the developers of the original library weren't prescient 
        enough (or didn't have the time) to develop everything you
        need.
    

This is what implicit conversions are for:

<http://www.scala-lang.org/node/130>

------
michaels0620
Does anyone know if there is going to be a video of the talk available? I
haven't been able to find anything so far and as a Java dev currently getting
my feet wet with a Scala hobby project, it seemed like an interesting
presentation.

~~~
logicalmind
[http://www.java-tv.com/2010/06/29/funky-java-objective-
scala...](http://www.java-tv.com/2010/06/29/funky-java-objective-scala/)

