Ask HN: Java/Groovy/Scala/Clojure/Ruby for your startup?
For what layers? And why?
For what layers? And why?
* Jruby, because we really like the level of metaprogramming of ruby, the readability, the ammount of libraries, the effort Charles Nutter put into making it a very good port of ruby, and the library support that feels like ruby (dsl-ish, easy to use, easy to change, with tests as documentation, etc), even if you are not using Rails.
* Clojure, because it is dynamic, and enforces immutable state (most of the time), it has great metaprogramming support as well (which is very important for readbility), and you can use type annotations to remove all reflection code, and use direct invoking (as fast as java).
* Scala, because it is much more convenient to use than Java (and has other advantages, http://bit.ly/4DIKy4), while still being compiled to very efficient java bytecode. Its static typing has issues (http://bit.ly/asQ7FC), as its lack of metaprogramming. Implicit conversions, on the other hand, can deal with it for most part.
*Java/Groovy: Scala should be the lowest level we would like to handle. Groovy feels a bit like Ruby, it has more metaprogramming facilities (like categories, and AST manipulations are builtin, unlike Ruby's Parse Tree, which doesn't work on 1.9). However, Jruby is the same language we use everywhere else, and Groovy is not faster than clojure. So it is a "master of none" type of language. Not to mention that its stack trace is riddled with java garbage, and it feels a lot like Java, which is really a put off.
This is mosty for backend, as with are probably sticking with Sinatra on front end for a looong while. Twitter uses Rails on front end even nowadays, so it seems like we won't have too much problem with it as well.
Scala's type inference makes the typing a lot less of burden, when compared to java, but it is still there.
Just our options. Feel free to make your own. People with lots of Groovy experience may choose Groovy, and those who really don't need much metaprogramming support may choose Scala. This is just not our case.
Some people also feel very uncomfortable with the lack of almost perfect auto-complete. Ctrl+k (text complete) on Netbeans is magical enough for us most of the time. We use lots of TDD, such that we can also refactor safely, therefore, type safety feels more like a burden when writing tests for things that don't exist on statically typed languages than on dynamic. Again, is a matter of taste as well.
For example Grails and groovy were supposed to be big on the java framework but due to seveeral reasons they seem to be really more niche. PArtly because it seems the people behind both of them just arent dealing wiht the problems such as bugs quickly enough.
Scala is an interesting language but again there doesnt seem to be a heavy push for it. Expect for peopel that are using it and know what its strengths are.
All of which leads to alot of confusion about which technology to use.
Then theres the issue of frameworks. Theres a million of them but none of them really stand out. ANd personally i dont think it helps that oracle is no running things.
On the other hand ruby is known by many people as being pretty powerful and used by alot of startups. Same thing with php. How many startups do you know that use java? I know foursqaure uses liftweb but thats about it.
Flightcaster, which is funded by YCombinator, uses clojure and Ruby on heroku (more on their infoq profile: http://www.infoq.com/articles/flightcaster-clojure-rails).
Most startups are not actually vocal about what they use. Most of them actually are not heard, so they could be as vocal as they wanted and still noone would hear them.
http://news.ycombinator.com/user?id=thomasfl worked on the project, so maybe he'll chime in with more details.
It's a nice compromise when you want something that cuts through boilerplate with metaprogramming/duck typing but can keep tight interop with Java where you need it... and you need a quick learning curve for Java devs.
That said, stack traces are horrible, debugging in Eclipse is difficult to impossible depending on how "dynamic" you get, there's no interactive debugger like pdb.set_trace() (that I know of) and the flexibility of the syntax can get out of hand quick. Great for limited use, like making mini-languages and glue for testing. Wouldn't want to support a large application written in it.
For a general programing task my choice is Python, stable, mature, well documented with an extensive library support. iPython is a fantastic shell for it, that's my interface to Python libraries and programs, good for developing, running code, debugging or for a quick peep to the documentation. Highly recommended.
http://code.google.com/p/guava-libraries/
We really like the support for higher-order functions, like Iterables.transform (aka map) and Functions.compose amongst others. There are loads of useful tools including MapMaker, which is great for building caches. The downside is that Function<X,Y> is an interface and implementations are often inner classes, which can be syntactically quite messy.
We've recently open-sourced our common library, which extends Guava with a few additional features we've found useful:
http://github.com/mbst/common/tree/master/src/main/java/com/...
My startup specializes in bringing other people's ideas into life. Most of our clients are also startups. Depending on their needs, we use Ruby on Rails, PHP, Java, Objective C/Cocoa, or C++. For my other startup, which is a webapp, I use Ruby on Rails.