Live data from Hacker News

Typesafe raises $14M to commercialize Scala

techcrunch.com

61–70 of 105 posts

Re: Typesafe raises $14M to commercialize Scala

#61
post #52

Earlier quoted context omitted.

To be fair, comparing something like this: (partition-by #(> % 60) [49 58 76 82 88 90]) to so-called line noise code seems reasonable enough. As with Perl, if you immediately know what all the punctuation means and what the underlying structure of the language is, it’s concise, but if you don’t, it’s quite a mess of random-looking symbols. For comparison, here’s a Haskell version, which in this case has a more intuit…

Really? There's only two bits of punctuation there, and they don't take much to explain: #(...) is an anonymous function; % is the argument to that function. (I'm not counting > because ... it's just the greater-than sign.) The Haskell version doesn't actually do the same thing. The Haskell returns [76, 82, 88, 90]; the Clojure returns ((49 58) (76 82 88 90))---it groups the input according to the result of the funct…

It’s not an ideal example of partition-by anyway, because this particular input has all the values where the predicate returns true together. As you have shown, the result in this case is just to divide the list into the values that match the predicate and those that don’t. This is actually what the “partition” function does in some languages, including Haskell and Scala. However, in general, partition-by in Clojure does more than that and is more like a kind of split algorithm, which this example didn’t demonstrate.

In any case, my point here was about syntax, so I used a standard and easily recognisable function in the other languages instead of getting bogged down in trying to reproduce the exact same behaviour. Apologies if this wasn’t clear.

Re: Typesafe raises $14M to commercialize Scala

#62
post #21

Earlier quoted context omitted.

It's not Perl all over again. Have you even _read_ those one-liners? Those are neither line-noise, nor fickle one-line imperative solutions. On the contrary, they are elegant and easy to read --you just have to understand the basics of functional programming, map, reduce, filter and the like (which, in themselves are trivial concepts). Stuff like those in the article: (pmap process-line lines) (dotimes [n 4] (println…

To be fair, comparing something like this: (partition-by #(> % 60) [49 58 76 82 88 90]) to so-called line noise code seems reasonable enough. As with Perl, if you immediately know what all the punctuation means and what the underlying structure of the language is, it’s concise, but if you don’t, it’s quite a mess of random-looking symbols. For comparison, here’s a Haskell version, which in this case has a more intuit…

[deleted]

Re: Typesafe raises $14M to commercialize Scala

#63

Earlier quoted context omitted.

I have absolutely no idea what this line does. If you don't know Perl, why should you expect to? I didn't know that #(...) represented a lambda in Scala until a moment ago.

'Knowing Perl' is a rather hard thing to do when the list of completely ad-hoc implicit variables and hidden context-sensitive surprises is seemingly endless.

Your grasp of English seems to include subject-verb number agreement, and I suspect you can handle pronouns. You'd do just fine with Perl.

Yes, lots of tutorials explain it badly, and yes, lots of people say "Why should a programming language take cues from natural language?", but implicit variables and context are concepts that primary school children have mastered. They're not that difficult.

Re: Typesafe raises $14M to commercialize Scala

#64
post #40

Earlier quoted context omitted.

my $file_text = do { local $/ = undef; open my $fh, ' }; I have absolutely no idea what this line does. local? undef? ' ? This is how you read a file in Perl?

I have absolutely no idea what this line does. If you don't know Perl, why should you expect to? I didn't know that #(...) represented a lambda in Scala until a moment ago.

It represents a lambda in Clojure.

Re: Typesafe raises $14M to commercialize Scala

#65
post #64

Earlier quoted context omitted.

I have absolutely no idea what this line does. If you don't know Perl, why should you expect to? I didn't know that #(...) represented a lambda in Scala until a moment ago.

It represents a lambda in Clojure.

You're right. I typed Clojure the first time, then for some reason uncorrected it.

Re: Typesafe raises $14M to commercialize Scala

#66
post #56

Earlier quoted context omitted.

Complexity of Scala has been debated many times. Just because a language adds some new concepts and is different than other mainstream languages, is not enough to call it "complex". Before you answer question about whether Scala is complex, try to answer the following questions first: Is JEE complex? Is Spring Framework complex? Is Maven complex? Are webservices complex? Is C# complex? They are, they introduce new co…

Just because something is complex doesn't mean it is bad, but something being really really complex (or feature rich), doesn't mean it is good either. Now I might be mistaken, but Scala is one of rare languages that actually has compiler commands that disable parts of it syntax (or there was a plan to do so). To me that yells - Too complex. I'm quite sure it is powerful. But it doesn't look like something I'd enjoy u…

As far as I know they haven't implemented disabling parts of the syntax in the compiler, yet. There were plans to do it, due to the fact, that for application coding there, the most controversial features are not used very often, and because of the posts like yours, that Scala is too complex. However, these features are essential for library / framework type of code. Scala collections library could not be that easy to use, powerful and clean if these powerful features like implicits were not in the language. Things like Squeryl could not be implemented, without adding special support in language (like in C#). Scala is pretty simple - just a few, very generic, powerful features, instead of thousands of special cases and compiler quirks.

As for verbosity: I coded a lot in Python, in Perl and then in Scala, and found Scala code to be sometimes even shorter. Note Scala is statically typed, it is harder for statically typed language to be terse. It does pretty well in this area, for a statically typed language.

As for doing things in different ways: in Python they say there should be one obvious way to do it. But it really isn't. Lots of things in Python could be done in different ways. This is inherent to programming, and it is a good thing, making programming more art than craft.

Re: Typesafe raises $14M to commercialize Scala

#67

That is good but I have used Scala before and would not recommend it for an enterprise project. It was rather convoluted and had lots of concepts that just would not make sense to the java programmers in our company. There would be teams that could have used it and thrived but overall the complexity of the language seemed to outweigh any reasons I could give to use it. I wish them the best but I think they will have…

I think the bigger hurdle to Scala adoption isn't language complexity, but tooling. It's not as mature as Java tooling, and compilation is dreadfully slow. Typesafe is actually putting some effort in improving Scala tooling, so hopefully the additional funding will help them move the ball faster in that area.

Yes! Exactly. This is the problem, not Scala being complex. Fortunately they are improving fast. FSC support in Idea is pretty good. If you have a decent processor, compilation is no longer an issue.

Scala is really very easy to start for someone who knows mainstream languages like C++ or Java or C# - you just start writing in it like in a better Java, then slowly learn new concepts... For me it took two weeks to feel comfortable with it. Actually much faster than with Python.

Re: Typesafe raises $14M to commercialize Scala

#69
post #54

That is good but I have used Scala before and would not recommend it for an enterprise project. It was rather convoluted and had lots of concepts that just would not make sense to the java programmers in our company. There would be teams that could have used it and thrived but overall the complexity of the language seemed to outweigh any reasons I could give to use it. I wish them the best but I think they will have…

Such a sad and unfortunately typical attitude of enterprise java developers. No wonder anyone with with any interest in programming avoids java like the plague.

And seemingly it's the default attitude of people who perpetuate the use of things like Spring as part of their core stack.

Re: Typesafe raises $14M to commercialize Scala

#70
I'm really rooting for wider adoption of Scala. I think the language hits a real sweet spot and I've been trying to transition to more scala for my android development. It's frustrating when I'm told by colleagues at work that they're basically not interested in doing projects in scala because "our clients sometimes need to be able to understand the code" or whatever other lame excuses.
Post reply on HN