Live data from Hacker News

Confessions of a Ruby Developer Whose Heart was Stolen by Scala

speakerdeck.com

11–20 of 74 posts

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#11
post #5

As a Ruby developer, I can't get through these sorts of slides. My other languages are C, Go and JavaScript, and the Scala syntax is totally inscrutable to me. Isn't the point of slides presenting something that can be easily absorbed? And I can't just quickly look up these declarations either — Scala is too complex for that given my experience level. Is there a gentle introduction talk for Scala around so I can eval…

As a Scala programmer I find Ruby syntax complex and inscrutable, almost like Perl.

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#12

Earlier quoted context omitted.

I would recommend that you immediately inform Yahoo, 37 Signals, Hulu, GitHub, Penny Arcade, and every other Node, Rails, Sinatra, and EventMachine user of this fact! Also, Tcl/Tk called and wants its use case back.

Those companies are using it properly though, don't they?

Who are "they"?

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#13

The speaker pays a lot of attention to implicits in Scala. Well, it's a powerful tool, elegant solutions can be built with it, but you should be careful using them. Implicits bring its own magic and abusing them can pollute your project, make it difficult to understand the code. Maybe the speaker is so attracted to inplicits because they remind him of Ruby's / Rails' magic?

You are correct that implicits are a sharp tool. Thankfully, the Scala community knows that nowadays and they are used for a fairly small number of cases - pimp my library (add methods to Ints, Strings, etc.) and typeclasses.

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#14
post #4

Earlier quoted context omitted.

I would recommend that you immediately inform Yahoo, 37 Signals, Hulu, GitHub, Penny Arcade, and every other Node, Rails, Sinatra, and EventMachine user of this fact! Also, Tcl/Tk called and wants its use case back.

Why do microsoft and google insist on static compiled languages?

Because they allow us to put very useful limits on the degree to which changes in a large and evolving codebase will violate the expectations of developers. When adding and changing code in large collaborative projects, the primary question in every developer's mind is "OK, what else depends on this, i.e., what is possibly going to break?" This goes back to the old wisdom of separating interface from implementation.

Highly dynamic languages, such as Ruby, certainly have their advantages too. But programs in languages which enable, if not encourage, developers to add new methods to the integer '5' can quickly become very difficult to reason about.

Static, strongly-typed languages also provide other benefits such as much better error checking and compile-time optimization.

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#16
post #5

As a Ruby developer, I can't get through these sorts of slides. My other languages are C, Go and JavaScript, and the Scala syntax is totally inscrutable to me. Isn't the point of slides presenting something that can be easily absorbed? And I can't just quickly look up these declarations either — Scala is too complex for that given my experience level. Is there a gentle introduction talk for Scala around so I can eval…

I'm a Python developer and find a lot of the Ruby criticism in those slides weird. For example you can also monkey patch in Python, but I only recall using it once in the last several years to fix a bug in one method in the standard library. Similarly it isn't a Python pattern to want to write 2.gigabytes.

Are the Ruby complaints in the slides real - do people do those sort of things often and expect other languages to behave like that too? Is that because of the standard library or innate to the language?

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#17
It seemed like most of his slides came down to the old typed/untyped flame war. Yes, in Scala you can look at your objects in an IDE and be told what type they are, in Ruby you can't. Some organizations and people need that, some don't. And yes, it's easier to optimize typed languages. Some applications need that extra speed, most don't.

I'm happy he found a language he enjoys working with, but I doubt this will change anyone's mind...

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#19

Scala is a fantastic language, but my heart seems to resist due to things like this (slide 27/42): implicit class RichSeq[A, C[A]

This is very dense code, and takes some getting-used-to in order to read. What it achieves is beyond the reach of many languages.

All it does is convert a Seq (sequence) to a lazy stream that will infinitely cycle through the values.

    Seq(1, 2, 3).cycle.take(8).toList
    res3: List[Int] = List(1, 2, 3, 1, 2, 3, 1, 2)
It will work for any seq-like structure (including List. Vector, Queue, etc.)

If you try to use it with anything else, like a Map, it won't compile.

Also, note from my example that it's generic and the resulting List is of the correct type.

Just like novice JavaScript developers struggle with "Why 'this' changes here?", it requires some experience with the language.

Re: Confessions of a Ruby Developer Whose Heart was Stolen by Scala

#20
post #19

Scala is a fantastic language, but my heart seems to resist due to things like this (slide 27/42): implicit class RichSeq[A, C[A]

This is very dense code, and takes some getting-used-to in order to read. What it achieves is beyond the reach of many languages. All it does is convert a Seq (sequence) to a lazy stream that will infinitely cycle through the values. Seq(1, 2, 3).cycle.take(8).toList res3: List[Int] = List(1, 2, 3, 1, 2, 3, 1, 2) It will work for any seq-like structure (including List. Vector, Queue, etc.) If you try to use it with a…

Brainfuck language is even denser.
Post reply on HN