HNHacker News
TopNewBestAskShowJobs

throwawuy222

3 karma · joined April 15, 2015

submissionscomments
throwawuy222··on Ask HN: Why do people have a hatred for Scala?
Is there any linters available for IDE's to ensure conformance with a vanilla ruleset of scala? If that existed, scala would be able to shape itself up nicely.
throwawuy222··on Ask HN: Why do people have a hatred for Scala?
For those who don't understand: Scalaz is an additional layer of syntax and tricks on top of what is already there. It seems to have quite a lot of power!

    implicit val option = new Traverse[Option] with MonadPlus[Option] {
    def point[A](a: => A) = Some(a)
    def bind[A, B](fa: Option[A])(f: A => Option[B]): Option[B] = fa flatMap f
    override def map[A, B](fa: Option[A])(f: A => B): Option[B] = fa map f
    def traverseImpl[F[_], A, B](fa: Option[A])(f: A => F[B])(implicit F: Applicative[F]) =
      fa map (a => F.map(f(a))(Some(_): Option[B])) getOrElse F.point(None)
    def empty[A]: Option[A] = None
    def plus[A](a: Option[A], b: => Option[A]) = a orElse b
    def foldR[A, B](fa: Option[A], z: B)(f: (A) => (=> B) => B): B = fa match {
      case Some(a) => f(a)(z)
      case None => z
    }
  }
Excerpt from https://github.com/scalaz/scalaz#type-class-instance-definit....
throwawuy222··on Ask HN: Why do people have a hatred for Scala?
There is such a thing as idiomatic scala? How? Care to elaborate?
throwawuy222··on Ask HN: Why do people have a hatred for Scala?
Basically I've seen this in person. Scala was driving the last startup I was in to the ground.

The thing that fascinates me is scala is like an art. It's like a new Obfuscated Perl Contest, but for functional programming. It doesn't really serve a purpose in legitimate business.

Scala code doesn't scale, it compiles too slow due to having too many features in the syntax. They took features normally meant for a standard library / external projects and literally augmented them into the syntax.

Scala, in it's current form, is a pipe dream. It really needs to be start over, but drastically simplified. Perhaps it should try to take a hit from Golang for compiler time advice: Simple languages compile fast and are easier to optimize.

throwawuy222··on Ask HN: Should I learn Scala or Go?

  He says the compiler implementation is a mess. he's still a contributor and involved in the language.
The implementation is a mess because the specification permits so much grammar and syntactic idioms. The moving target and bloated spec is worsened by package version, language mismatches and incomplete repositories.

Of course your compiler is going to be an unmaintainable jungle when you treat the language itself the way most others leave for standard library or even separate projects.

Golang does the opposite, and lives in splendor. Compilation times are imperceptible. Syntax is simple. Standard libraries are solid. Third-party projects are importable via git repositories. Golang is about keeping it tight, staying out of your way, helping you where it counts most, and trying to minimize the downsides.

  Not everyone needs idiotic languages that ignore 30 years of programming research to coddle their fragile ego. We're not all like you.
Golang is written by Rob Pike. Both languages build upon a legacy and have their pragmatic elements.

  Second, your argument is basically you aren't smart enough to write/read scala. 
The job is to ship features. Clever code and arithmetic bring little value.

I'm happy to see that Java programmers can have a cleaner language and some nice functional features. I wish they'd spec things out with more forethought and reigned in the idioms.

throwawuy222··on Ask HN: Should I learn Scala or Go?
This isn't an accurate depiction of what scala ends up looking like.

If all scala stuck to simple idioms like in the example, it'd be an excellent language.

throwawuy222··on Ask HN: Should I learn Scala or Go?
(throwaaway here)

Before you waste the next few months of your life learning a corrupt programming language:

- Typesafe co-founder quits: https://www.youtube.com/watch?v=uiJycy6dFSQ - https://vimeo.com/64716826: Paul Dix - Why Node and Scala will dry up: Go will drink their milkshake

- I can personally tell you, scala is awful at handling large codebases and is so filled with idioms, you have a difficult time reading it. I remember opening scala code, seeing english, but it felt impossible to decipher.

- You feel clever when you write it. No doubt about that. Other programmers and your customers don't care.

- Compilation time: It's atrocious, we're talking 1 to 10 minutes to compile web apps.

- Package dependencies: You end up incorporating java at the end of the day. Version mismatches.

- As for the "functional language" thing, just pick real Haskell or Ocaml. Don't fall prey to scala being a functional language.

- You need to rely on a huge, laggy IDE with missing / out of date plugin packages to get autocompletion.

On the other hand, Golang:

- compiles these massive applications in line 2 seconds.

- It's highly lintable.

- The syntax is just... dumb.

- Yet you don't feel limited at all.

- It runs fast-fast-fast without having to rely on JVM.

- Familiar syntax... like a hybrid between Python and C

- You can import packages from github / git repos, automatically grab dependencies with one command.

- The build system and tooling is simple and genius

- Autocompletion (https://github.com/nsf/gocode)

OP: I hope you don't waste your time on a scala venture. Scala has it's die hard fanboys, especially those who spent 15 years in java and have too much of an ego-investment to think anything else, but even the co-founder of typesafe, the most prolific committer says the language is a mess.