Hacker News new | ask | show | jobs
by ssmoot 3736 days ago
People say that. But it's totally misguided IME. You're talking about scalaz.

Normal Scala code has fewer symbols than Ruby aside from function lifting (the underscore).

In fact, you've got Generics (square braces), curly braces for blocks, fatty arrows for call-by-name, functions parameters and pattern matching. Parens for methods and tuples. Underscore for function lifting. cons (double or triple colon). Stab by arrows as an optional shorthand infix notation for creating Pairs AKA Tuple2.

Every once in a blue moon you might see :+ to mean add a single item.

You can write a whole heckuva lot of Scala and never use much more than that. If you're facing symbolic overload then you should probably reevaluate the libraries you're using.

The only ones I use frequently that add anything else are spray-routing/akka-http's Route.~ to concatinate routes and json4s's JObject.~ to concatinate two objects together.

Yes there's a world of libraries that add a lot more, but they're entirely optional. You aren't a bad programmer if you do or do not use scalaz. (At least I don't consider myself a bad one, and I don't.)

Scala itself doesn't actually extend all that far beyond c#. The FUD around symbols in Scala is just that. You add cons, the occasional stabby arrow and the underscore and you've got the extent of Scala's additions you'll find in your average library.

I just do not get how people walk away with this impression. Especially Rubyists where ivars, cvars, pipe characters, two different HashMap styles etc is in everyday code.

IME Scala developers in-training don't actually have much trouble with this stuff. What they have trouble with is pattern-matching structure and function composition.

But Ruby can't do either.

In fact, other than the ability to invent more complex DSLs with more symbols I'm not actually sure that there's anything Ruby does better. Or more consistently.

1 comments

The problem is that having Scalaz and its ilk underpinning a lot of libraries mean that, if you need to go down the debugging stack, you find yourself pretty quickly in squiggle soup.
> a lot of libraries

Then I'd go back to the issue of: You might be using the wrong libraries if you find that frustrating.

I don't think any of the libraries I'm using in my current project utilize any typelevel stuff to a noticeable extent. I have seen it in my classpath, but haven't bothered to see where it's coming from and never run into any of it despite using CMD+B very frequently in IDEA.

You can go a pretty long ways with Scalatest, Akka, json4s, and maybe some commons stuff for REST service development. Play development isn't all that much different though.

If you're deep in science, maybe your library needs change. But then again I would assume less complaint over mathy concepts then. Maybe that's off-base.