Live data from Hacker News

Scala School

twitter.github.io

101–110 of 178 posts

Re: Scala School

#101
post #62

Earlier quoted context omitted.

You can be just as productive as you would be in Python/Ruby/JavaScript/Go from day 1 in Scala - usually the same code will work, with minor syntax differences and maybe the occasional type annotation. The difference is there's more to learn in Scala that will make you even more productive, but that should never be a downside, and you don't have to learn it if you don't want to.

You are really stretching things by saying you'd be productive on day 1. Scala code has an immediate upfront complexity cost.

I have to agree with "lmm" and "the_af" here. You can use Scala as a "Java without semicolons", and indeed that's what I recommend to those who want to learn Scala coming form an OO background. There is absolutely no need to use fancy Scala features like higher-kinds or monadic effects. Indeed, there is no need even to use functional features. Scala is a perfectly fine OO language. The one thing I recommend to learn once a learner gets a grip on Scala syntax is pattern matching matching and case classes. It's really easy to understand. And once you understand it, you never want to go back.

I have had a substantial number of undergraduate students learn Scala this way for their final year project and they all got it pretty quickly.

Re: Scala School

#102
post #7

Learning Scala is such a pain. Either you follow a large book completely and master it across several months/years or go through overly complicated online guides and get discouraged. I understand it's a large, advanced language, but the community has to seriously work on making things a bit easier for beginners like me. Just look at how easy it is to learn Go or Rust, their official tutorials are amazing and free on…

I've taught Scala to tens of engineers. The golden path is the Coursera course "Functional Programming Principles in Scala"[1]. It's a pretty comprehensive set of lessons, by the author of the language, of how to tastefully compose the basic elements of Scala to solve interview-sized questions. I really think that Martin Odersky's skill as an educator is a highly underrated part of the success of the language. [1] ht…

I have asked tens of final year students to learn Scala for their final year projects, and pointed them towards Odersky's Coursera course. All my students liked the course, picked up Scala quickly, really enjoyed programming in Scala afterwards. Once they get it, they typically say something along the lines of "I never want to go back to Java".

As an aside, part of why Odersky's course work so well is that it's influenced by SICP (Structure and Interpretation of Computer Programs) by Abelson and Sussman.

Re: Scala School

#103
post #64

Earlier quoted context omitted.

It's the best language going these days, IMO; it's a real sweet spot in terms of power, flexibility, maturity, ecosystem and learning curve. It's not the best at any one thing but it's the best overall language. Haskell is possibly more powerful, but it's (for many people) harder to learn and doesn't have quite the same library/tool support. Ceylon (or Idris) is probably better designed, but you won't find much in th…

How does it compare to Python or Ruby?

I have done a lot of Ruby work and a lot more JavaScript work (not one of the languages you mentioned, but I consider it a similar language to ruby/python). I find Scala to be a lot more enjoyable to use compared to them. It's probably my favorite language so far.

I never thought I would like statically typed languages, but now I don't know how I can live without them.

Scala is also more functional than Ruby or Python. I use it in a hybrid OO/Functional style. I probably lean 80-90% functional though.

As for people complaining it being hard to read, I disagree. Sure, some people try to be clever and play the, "how much can I reduce this code down to as few lines as possible" game. But if you break things out and not chain too many combinators or use too many symbolic operators, it can be readable. I don't find it any more difficult or easy compared to any other languages out there. It's just how you write it.

I think the biggest hurdle is to find a good mentor to give you the ah ha! moment when learning Scala (or any other functional language). I don't think many people can learn it by themselves. But once someone shows you how you can write your app in a more functional way, you begin too see some of the benefits of FP.

Re: Scala School

#104
post #11

Earlier quoted context omitted.

It was considered at one point, but the main proponent for one JVM language has left the company and even before that there was strong support for keeping Scala on the list of production languages.

> the main proponent for one JVM language Hey, I'm interested in that! What proponent? What language? If it was Raffi Krikorian would you mind having a look at https://en.wikipedia.org/wiki/Scala_%28programming_language%... and perhaps update it?

I was not a first party to the discussion, but what I heard is that Alex Roetter had asked the most senior engineers to consider strongly whether or not it would be better to have one JVM language. Twitter pays a polyglot tax and Scala's tool chain is clearly not as mature as Java's. In the resulting discussion, though, even engineers that primarily wrote systems in Java wanted to keep Scala as an option.

I had one conversation 5 years ago with Raffi about which language something should be built in. He advocated strongly for me doing it in whatever I felt made the most sense. I think this is typical of his management style -- which is to establish goals and let the people responsible for achieving those goals work out how to do it. Raffi had left the company by the time the JVM standardization discussion happened.

Re: Scala School

#106
post #70
post #22

Earlier quoted context omitted.

I'm curious, why Scala over all other options?

It's a fantastic language. It combines the conciseness and readability (if you stick to sensible method names) of Python with the safety of OCaml and the performance of Java. It combines the type-level power of Haskell (i.e. the ability to explicitly sequence effects) with traditional OO inheritance/subtyping and performance behaviour you can reason about (helped by the JVM's well-established profiling/instrumentatio…

> What else would you use?

Oh, no, I was asking mostly as a noob. I've since decided to have a go at learning Scala, and your answer reinforces that decision.

Re: Scala School

#107
post #13

are there any other big company relying on scala for their core infra ?

The Weather Channel's core weather services such as their weather API, their alerting services (for your phones), and most of their other services are all written in Scala.

Re: Scala School

#108
post #75

(Somewhat off-topic, sorry) This book does an interesting thing: > For each chapter (and occasionally for individual sections), I indicate the experience level. The chapters progress through levels A1, L1, A2, L2, A3, L3. The number is the expertise level, from junior to expert; A stands for Application developer, L for Library developer. I often find myself unsure about wheter a book or text is intended for the kind…

I find this schema, promoted if I'm not mistaken by Martin Odersky himself, as one of the biggest marketing blunders possible as far as programming languages are concerned.

You keep telling developers that they are not good enough but they should rest assured that some smarter people are working on the problem and they'll come back with the answers.

When in reality, I think that all developers, when using a library, would like to think that they could have written it themselves, it they would have had the time or the interest.

Re: Scala School

#109
post #100
post #82

Earlier quoted context omitted.

I am speaking from direct personal experience. Explicit effect sequencing is optional (in contrast to Haskell), traditional OO with inheritance is available. You may not be able to read all the standard library type signatures on day 1 but the documentation is adequate without them. Anything you could do in Python/Ruby/Javascript translates directly; in the very short term I guess not having a single baked-into-the-l…

I have found that the issue isn't the language, it's the ecosystem. If you're coming from Java environment set up is not such a big deal, but if your brand new it is not as easy as other languages.

There are certainly poor libraries and bad advice going around (why people tell beginners to use SBT or ScalaTest is beyond me), but that happens in every language. IME the average quality on maven central is if anything better than on PyPi/rubygems/npm/etc., and the IDEs/profilers/debuggers are better than anything you can get for the other languages.

Re: Scala School

#110
post #100
post #82

Earlier quoted context omitted.

I am speaking from direct personal experience. Explicit effect sequencing is optional (in contrast to Haskell), traditional OO with inheritance is available. You may not be able to read all the standard library type signatures on day 1 but the documentation is adequate without them. Anything you could do in Python/Ruby/Javascript translates directly; in the very short term I guess not having a single baked-into-the-l…

I have found that the issue isn't the language, it's the ecosystem. If you're coming from Java environment set up is not such a big deal, but if your brand new it is not as easy as other languages.

I've found that Scala beginners google around, and come across lot's of blog posts extolling the virtues of Scalaz, implicits, using higher kinded types, embedding DSLs and so forth. All that is worthwhile, but not really accessible to beginners. It's understandable that Scala bloggers want to write about cutting-edge material, but this misleads beginners, who think you need to use Scalaz, monads and the like to be productive. Nothing could be further from the truth.
Post reply on HN