Re:Scala – 1 Star – Would Not Program Again
by runn1ng on Monday December 02, 2013 @04:18AM
(#6832640)
Wait.
Scala has unicode operators?
Wow.
Scala doesn't make a distinction between operators and methods, and Java has always supported unicode in method names, so they have to be possible for compatibility if nothing else. I think if used carefully, with discipline, they can make code more readable and ultimately more maintainable - e.g. for doing set algebra it's nice to be able to have ∪ and ∩ methods. But yes, if you want to shoot yourself in the foot with them it's very easy.
Re:Scala – 1 Star – Would Not Program Again
by joeygibson on Monday December 02, 2013 @06:48AM
(#6833102)
I showed an example of using Unicode operators in a presentation I gave to the Atlanta group back in 2010. It doesn't say it in the slide, but when I gave the talk, I explained that while it sounds like a neat idea, you should probably avoid doing this. You can see the slide here, where I used a Delta as an operator slideshare.net/slideshow/embed_code/2923973?startSlide=9
Re:Scala – 1 Star – Would Not Program Again
by draegtun on Monday December 02, 2013 @05:44AM
(#6832942)
Perl6 also has unicode operators - https://news.ycombinator.com/item?id=4942377
I can't speak for SBT because I don't use it, but Spray is probably the nicest library for defining HTTP APIs I've ever used, in any language. As for type inference, yes it's imperfect, and maybe disappointing for someone used to Haskell, but coming from Python I found the set of type annotations I needed to add to make my Scala compile was a subset of the ones I wanted to document anyway.