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.
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.
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.
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.