News for hackers. Stuff that matters.
Re:Typesafe raises $14M to commercialize Scala by tonetheman on Wednesday August 22, 2012 @08:52AM (#4417089)
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 a hard time getting Scala into the enterprise. For smaller companies it probably would make sense.

Ah well not trying to be a downer. :)

Re:Typesafe raises $14M to commercialize Scala by pkolaczk on Wednesday August 22, 2012 @10:13AM (#4417411)
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 concepts and in many ways they have much more rough edges than Scala (remember JEE 2.1?). Somehow all of them have been widely used in enterprise software development in many successful projects.

I'm surprised by how much flexibility Scala offers with so few simple concepts. Ok, you have to take some time to learn them. But this is the same as learning just any new API.

Re:Typesafe raises $14M to commercialize Scala by eta_carinae on Wednesday August 22, 2012 @04:56PM (#4419526)
> 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".

It seems to me that the JVM community has moved on from Scala and is actively looking for a language that offers most of the benefits that Scala offers without the downsides.

Kotlin (from JetBrains) and Ceylon (from RedHat) seem to be the first two languages with a really interesting take on this problem. Gosu and Fantom are similar attempts, although I think these two already failed to gain traction.

Re:Typesafe raises $14M to commercialize Scala by pkolaczk on Thursday August 23, 2012 @04:13AM (#4421400)
To be honest, by the time they are ready for production, Java 8 will provide the most of the features they are promising. So for developers who only want to have lambdas and slightly better libraries (like ability to call filter on a collection), there is no need to move. Just wait for Java 8.

On the other hand, for programmers doing some more serious stuff than just moving data from database to the website, they offer too little to be attractive, and they actually haven't solved any problem that Scala hasn't solved (Ceylon's generics reification - a good joke, man). They are nowhere near Scala in expressiveness and flexibility and being only slightly better than Java is not enough for power-coders. There were some languages targeted as "better Java", e.g. Nice long time ago and they also failed.

From the alternative languages for JVM, currently only Clojure and Scala (and probably Groovy too) got some serious usage in industry. All others are still in kindergarden.

Re:Typesafe raises $14M to commercialize Scala by Ygg2 on Wednesday August 22, 2012 @01:03PM (#4418331)
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 using.

My main gripes about Scala is that the trait system is way less elegant than the Smalltalk variant [1], there seems to be a hundred different ways to do a thing (as opposed to a more unified way of doing things) and the overall "automagical" implicit. Not to mention the overall verbosity and ways the different features mesh together.

[1]http://www.cs.cmu.edu/~aldrich/courses/819/Scha03aTraits.pdf

Re:Typesafe raises $14M to commercialize Scala by pkolaczk on Wednesday August 22, 2012 @01:52PM (#4418607)
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 by edwinnathaniel on Wednesday August 22, 2012 @11:21PM (#4420727)
Let's take a look at it from a different angle.

Say, I have a group of developers who have been trained to use Java (both best-practices, idioms, tools, etc).

Let's say that JEE 6 shows up (no, I don't remember JEE 2.1, what is that? is that thing even exist?).

JEE 5/6 introduces a few things on top of my head (please pardon me of the syntaxes):

1) Dependency Injection via annotation (CDI in JEE6, EntityManager in JEE5)

Introduction: annotate the instance property you'd like to inject and GlassFish will magically give the class to you.

Example:

@Inject

AccountService accountService;

2) JAX-RS

Introduction: A class, that works like servlet, but without doGet() or doPost(), instead you have methods that maps to the request-path based on the annotation.

Example:

@Path("/account/{id}")

public Account get(@PathParam("id") final long id)

3) Transaction (in EJB3 which appears in JEE5)

Introduction: Sprinkle annotation in your class or method, you get transaction magically.

Example:

@TransactionAttribute(REQUIRED)

public class AccountRepository

or

@TransactionAttribute(REQUIRED)

public Account updateAccount(final Account toUpdate) {...}

So I'm not sure how complex all of these to grok, granted if you need to do something out of the ballpark, you may have to learn a bit more of each individual component but to get started and be productive seems quite easy for me.

Now let's compare that with picking up Scala from zero (given that you know Java already) and get comfortable and productive with Scala, its tools, and its libraries to build web-application with the similar setting of that in JEE (web-service, REST, persistence/db/orm/transaction layer, unit-test, integration-test, etc).

No cheating though: no calling/utilizing JEE. Has to use all-things Scala libraries.

Re:Typesafe raises $14M to commercialize Scala by pkolaczk on Thursday August 23, 2012 @04:25AM (#4421417)
"So I'm not sure how complex all of these to grok, granted if you need to do something out of the ballpark, you may have to learn a bit more of each individual component but to get started and be productive seems quite easy for me."

It is so easy only if you don't try to write some serious production level stuff using it. You must be insane to start a project in JEE knowing only some basic tutorials and without deep understanding how the full stack works. I worked for a company that do JEE trainings. It was near impossible to teach a team using full JEE stack in 5 days (7 hour / day) - no, actually each single component is like 1-2 days of training, given that everything is preconfigured and ready to go. And after training they usually ask for consulting, because they still have some technical problems with it.

This is similar to Scala. You have to probably have someone on the team with deep understanding, but most of the coders just need to know how to do basic things in it.

We used Scala for a project in the company, and the only concern then was poor tooling (that was 2 years ago - it is much much better now), not the language itself. Most programmers just jumped right into it as a Java with slightly simplified syntax - "oh, I don't need to know when to use Integer and int, cool!".

// Errata: I meant EJB 2.1, not JEE 2.1, sorry for the mistake.

Re:Typesafe raises $14M to commercialize Scala by edwinnathaniel on Thursday August 23, 2012 @09:15AM (#4422134)
Actually... I've had previous positive experience dealing with some parts of JEE and some parts of Spring from almost zero (just knowledge on Servlet and JSP) to production level (JAX-RS, JAX-WS, JPA/Spring-Data/Spring-Transaction, Spring-Portlet-MVC, Spring-Core). They just seem to ... "work out of the box".

Had two production issues in a year and they are all JPA.

From all of the modules, JPA seems to be the more complex piece of the puzzle with EJB/JMS probably trailing. (Granted we did not have to use JMS yet).

While I do understand your side of the story (you may be aiming for JEE full-stack from JSP, JSF, Servlet, JPA, EJB and tons of its quirk, JMS, transaction, etc), if you focus to the essential: JEE 6 web-profile, it is much easier compare to starting with Scala from zero to knowing best-practices and idioms of the language.

Re:Typesafe raises $14M to commercialize Scala by pkolaczk on Thursday August 23, 2012 @01:03PM (#4423483)
Agreed, but before JEE 6 web profile, essentially all before JEE 5 was much much harder to work with. Deploying a basic demo EJB 2 app on some ancient JBoss took our team of "enterprise developers" about two weeks. I'm just saying Scala is nothing exceptionally more complex than many other things that are or were used by so called "enterprise developers".

BTW: on the last training in databases I led we used Scala as a language in which some sample programs were created. The group was not specifically prepared for that. Actually they were even not all Java developers. They had no problems in understanding Scala code and modifying it for the purpose of the excercises.

Re:Typesafe raises $14M to commercialize Scala by flatline on Wednesday August 22, 2012 @11:24AM (#4417804)
This really just amounts to vague hand-waving that language complexity somehow impacts productivity. Do you have any evidence to back up this fear? C# seems to have done reasonably well in the enterprise, and it has much greater complexity than Java. It doesn't have all the flexibility of Scala but for common use cases I think they are actually pretty comparable. Same goes with F#, which is not tailored to everyone's needs but is there out of the box in Visual Studio (it is an ML-based language). I've never seen it be an actual issue for people who are not experienced with e.g. functional programming, to perform maintenance on a program written with a lot of FP constructs. They may need a little guidance at first but every developer I've worked with loves this kind of stuff when they first see it. Bad code can be written in any language and it usually isn't clever people pushing the boundaries who write it.
Re:Typesafe raises $14M to commercialize Scala by tesseractive on Wednesday August 22, 2012 @02:07PM (#4418693)
You don't typically see F# adoption in the enterprise either -- it's in use in specific business domains like finance, but rarely for writing general-purpose line of business apps.

Really, the "unsuitability" of Scala for the enterprise says as much about the common problems with enterprise development (What, expect developers to learn something new?) as it does about Scala.

I say that as someone who currently does C# work in an enterprise environment in which there is a ban on using "var" to declare variables with type inference.

Apparently

    Dictionary<string,List<string>> dictionary = new Dictionary<string,List<string>>();
makes it really clear what the variable type is, but

    var dictionary = new Dictionary<string,List<string>>();
makes people's brains hurt.

Sigh.

Re:Typesafe raises $14M to commercialize Scala by tonetheman on Wednesday August 22, 2012 @02:14PM (#4418736)
I was in fact just being honest. It is not vague hand waving. I showed many peers what Scala had to offer and it was just not a good fit. Everyone of them thought it was complex. I am not alone in that.

Scala is just a large leap from Java. It just is. I thought it was ok but the reality was it would hurt productivity. I would say the same thing about Clojure. I like clojure a lot but it would be hard to recommend to a large established biz.

Re:Typesafe raises $14M to commercialize Scala by leothekim on Wednesday August 22, 2012 @10:42AM (#4417556)
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.
Re:Typesafe raises $14M to commercialize Scala by pkolaczk on Wednesday August 22, 2012 @01:59PM (#4418652)
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 by zmmmmm on Wednesday August 22, 2012 @07:59PM (#4420216)
Yeah, this is ultimately what prevents me from contemplating using Scala in a broader context. I will admit I haven't tried for a while, but every time I've tried out the Scala eclipse plugin it's been incredibly flaky. For the top tier of developers this doesn't matter too much (they can either handle flakiness or do without an IDE at all) but companies specifically do not want to build their systems dependent on constantly having top tier developers to do every little change they need.

You can contrast with Groovy which while still not perfect, has an awesome eclipse plugin and SpringSource offers a whole customised eclipse version for working with their stuff.

Re:Typesafe raises $14M to commercialize Scala by thebluesky on Wednesday August 22, 2012 @10:35AM (#4417516)
Works just fine for us, even our college sophomore intern had no trouble figuring it out.
Re:Typesafe raises $14M to commercialize Scala by ExpiredLink on Wednesday August 22, 2012 @01:16PM (#4418400)
"I think I've figured Scala out." http://news.ycombinator.com/item?id=3781276
Re:Typesafe raises $14M to commercialize Scala by pjmlp on Wednesday August 22, 2012 @03:07PM (#4419002)
Guardian, Facebook and Twitter are pretty much enterprise to me.
Re:Typesafe raises $14M to commercialize Scala by eweise on Wednesday August 22, 2012 @12:52PM (#4418284)
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.
Re:Typesafe raises $14M to commercialize Scala by tesseractive on Wednesday August 22, 2012 @02:10PM (#4418720)
The core problem isn't "java", it's "enterprise".
Re:Typesafe raises $14M to commercialize Scala by weego on Wednesday August 22, 2012 @02:03PM (#4418675)
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 by J446 on Wednesday August 22, 2012 @04:28PM (#4419408)
don't forgot to add Hibernate to that for everyone still living in 2004
Re:Typesafe raises $14M to commercialize Scala by taligent on Wednesday August 22, 2012 @09:08AM (#4417138)
You are 100% correct.

When you give developers a new set of tools they are inevitably going to use them. Some will understand and use them well. The overwhelming majority won't. And in an enterprise environment where you have a higher turnover of developers and tight deadlines it will be the equivalent of a ticking time bomb.

And because the framework is centered around Play which has/had a good reputation it won't invoke that suspicious, foreign language feeling in developers that it probably should.

I very much suspect that the future of Scala is going to rest in the hands of Guillaume Bort's ability to wrap any of the nastiness.

Re:Typesafe raises $14M to commercialize Scala by batista on Wednesday August 22, 2012 @09:28AM (#4417203)
>it won't invoke that suspicious, foreign language feeling in developers that it probably should.

The "foreign language feeling" is a good thing in a developer? Who would have thought...

Talk about narrow horizons...

Reminds me of the Blues Brothers joke: "We play both kinds of music at this bar, country AND western".