Live data from Hacker News

Scala – The Simple Parts

slideshare.net

21–30 of 52 posts

Re: Scala – The Simple Parts

#21
post #7

A word of advice: if you move from the .NET platform - C# - to the JVM, then Scala is your language. Java was your language for a very long time, and Java 8 is pretty close, but I still believe Scala is the right choice. There is a ton of complexity in the type system but you don't need to learn it all at once. If you approach Scala development like you approach C# development you'll go far.

I agree, if one can afford to be in a company that gives some freedom about which tools to use.

If we are talking about the typical enterprise, with mega projects, having out-sourcing and off-shoring components, then Java is still the king.

Since a few years I am mostly involved in such type of projects and I see how many of such developers struggle with modern programming concepts.

Re: Scala – The Simple Parts

#22

Scala was the first ML family language I learned. I tried to love it, but found I needed help learning it, so I turned to Haskell hoping for a better understanding of some of Scala's type system and other ML concepts. Then I fell in love with Haskell. Equally complex, if not moreso, and not any easier, but it felt simpler since it focused on a single paradigm instead of attempting to mix two big ones, and the whitesp…

yep. When I first tasted Scala it seemed great, but the having abstractions that leak less (haskell) is something I really appreciate.

And there's something about Scala using traits for everything that rubs me the wrong way.

Stuff like this I still find odd, mixing abstract classes with functions and inheritance.

        abstract class IntSeqBuffer extends SeqBuffer {
     	     type U = Int
	}
	object AbstractTypeTest1 extends App {
  	  def newIntSeqBuf(elem1: Int, elem2: Int): IntSeqBuffer =
    	    new IntSeqBuffer {
         	 type T = List[U]
         	 val element = List(elem1, elem2)
       	       }
  	  val buf = newIntSeqBuf(7, 8)
	}

Re: Scala – The Simple Parts

#23

Scala is great no matter what is the "true" answer to the question "is Scala too complex?". If it's indeed too complex for the mass average developers, then I can use it to filter them out. I got a free way to hire better developers (I don't have to use Scala in production in order to use it in interviews...) Also if you do find a top developer who managed to master Scala's complexity, then the complexity is no longe…

Productivity of a programming language is a tricky bit. Definitely you can achieve more with less characters in Scala than Java. Are you paying by the character? For me, legibility and long term readability is the most dominating factor out of any. This is really subjective, but saving on characters you have to type, only to make the code a lot harder to read seems like penny wise pound foolish to me. And to pull out…

Yes, you're always paying the character: each character increases mental load on the developer - either through code complexity (https://github.com/scalaz/scalaz) or just the sheer amount of code (would you want to code everything in assembly?).

Leaky abstractions, as you mentioned, result in unclear code. On the other hand, well-designed and easily understood abstractions reduce complexity.

Take for example, the atrocious lambda 'hacks' needed before Java 8 - create an anonymous class, then override a method. Compare that with something like words.map { _.size }

Re: Scala – The Simple Parts

#24
post #8
post #3

Earlier quoted context omitted.

I think achieving PHP or Java levels of adoption is as much about timing and serendipity as it does language features.

Java(blue collar language http://dfjug.org/thefeelofjava.pdf ) is easy. Scala is not( http://blog.goodstuff.im/yes-virginia-scala-is-hard ). (I am a Scala fan.)

I wish they would get rid of CanBuildFrom

Re: Scala – The Simple Parts

#25

Earlier quoted context omitted.

There is a lot to love about Scala, but one of the hurdles is/was the compile time. I used Scala and I didn't love the tooling around it. Even installing and running scalatra, I felt like it was maven installing THE WORLD, just to build a very small thing. Then, once I got it going to have a very simple change, save, refresh to see changes loop in my web workflow was like 3-10 sec. Not huge, but I'm used to PHP or Ru…

I'm gonna sound like a weirdo, but I still like Java, especially Java 8, and IntelliJ.

On the JVM I like Scala and Clojure more than Java, but I am realistic and know that those languages are only available to me for hobby projects, given how the enterprise works.

Re: Scala – The Simple Parts

#26

Earlier quoted context omitted.

Productivity of a programming language is a tricky bit. Definitely you can achieve more with less characters in Scala than Java. Are you paying by the character? For me, legibility and long term readability is the most dominating factor out of any. This is really subjective, but saving on characters you have to type, only to make the code a lot harder to read seems like penny wise pound foolish to me. And to pull out…

I'm curious to see how Scala matures. Right now the community is really into the FP side. So much so that they want to make everything look like Haskell. So we've got operators and types and nomenclature that doesn't make sense to the average developer. So the developers could mature/advance/become-academic or they could take the good parts of Scala and treat it as Java++. I, frankly, think the second is better.

I'm not sure if it's accurate to say that the community is on the FP side, or if there's just an extremely vocal FP community within scala drowning out all the other scala community members.

Re: Scala – The Simple Parts

#27

Scala is great no matter what is the "true" answer to the question "is Scala too complex?". If it's indeed too complex for the mass average developers, then I can use it to filter them out. I got a free way to hire better developers (I don't have to use Scala in production in order to use it in interviews...) Also if you do find a top developer who managed to master Scala's complexity, then the complexity is no longe…

I don't think that a language that is too complex for "mass developers" is necessarily a good test for finding better developers. That assumes that better developers flock to more complex languages.

Re: Scala – The Simple Parts

#28

Scala is great no matter what is the "true" answer to the question "is Scala too complex?". If it's indeed too complex for the mass average developers, then I can use it to filter them out. I got a free way to hire better developers (I don't have to use Scala in production in order to use it in interviews...) Also if you do find a top developer who managed to master Scala's complexity, then the complexity is no longe…

Productivity of a programming language is a tricky bit. Definitely you can achieve more with less characters in Scala than Java. Are you paying by the character? For me, legibility and long term readability is the most dominating factor out of any. This is really subjective, but saving on characters you have to type, only to make the code a lot harder to read seems like penny wise pound foolish to me. And to pull out…

I don't pay by the character but I do read by the character. I think there's a huge readability gain in having classes that fit on a single screen, which just isn't practical in Java (if nothing else, because of all the getters and setters that scala's uniform access principle lets you avoid).

I think the focus on operator overloading is misplaced; in C you might not be able to write "a + b" and have it launch some missiles, but you can write "add(a, b)" and have it launch some missiles, which is just as bad. If anything Scala is more predictable and uniform here - "a + b" is just sugar for "a.+(b)", methods and operators work the same way, and the operator precedence list you have to memorize is much shorter than C's.

Re: Scala – The Simple Parts

#29
post #18

Earlier quoted context omitted.

That's just a load of CS elite nonsense. Mass market programming languages are built on the back of "non serious engineers" as you call it. PHP is big because it is legible and works for literally 10 million "not serious PHP engineers". Ridiculing the funnel of people into engineering is insane. This comment alone is the reason why 50 women didn't go into CS this week.

Hyperbole much? If a man or woman is that put off by this sort of comment, they're probably more suited for another field of endeavor.

I prefer the term rhetoric.

It has been proven that anxiety about not "knowing enough" or being "good enough" at programming is keeping women out of CS. By segregating students into ability levels, one college was able to get enrollment up to 42% in CS:

http://www.bloomberg.com/video/76028566-harvey-mudd-presiden...

Considering how important programming is becoming, how many aspects of our lives are ALREADY controlled by code, your "suited for another field of endeavor" comment just makes no sense.

Re: Scala – The Simple Parts

#30
post #28

Earlier quoted context omitted.

Productivity of a programming language is a tricky bit. Definitely you can achieve more with less characters in Scala than Java. Are you paying by the character? For me, legibility and long term readability is the most dominating factor out of any. This is really subjective, but saving on characters you have to type, only to make the code a lot harder to read seems like penny wise pound foolish to me. And to pull out…

I don't pay by the character but I do read by the character. I think there's a huge readability gain in having classes that fit on a single screen, which just isn't practical in Java (if nothing else, because of all the getters and setters that scala's uniform access principle lets you avoid). I think the focus on operator overloading is misplaced; in C you might not be able to write "a + b" and have it launch some m…

Humans read by the word, not by the individual letters. + vs add() is not a real cognitive burden.

Btw what does the operator ~ do in scala?

Post reply on HN