InfoQ

News

Scala: combining the best of Ruby and Java?

Posted by Floyd Marinescu on Jun 09, 2006 12:17 PM

Community
Java,
Ruby
Topics
Scripting,
Programming
Tags
Scala,
Functional Programming
While the Ruby vs. Java / dynamic vs. static debate continues, a small community has been forming around the Scala programming language, which has has some of the best features of both languages but is also a functional programming language and runs on the JVM.  Like Ruby, Scala has a very terse syntax and its extensibility makes it suitable for writing DSLs, like Java, Scala is statically typed and can call Java code seamlessly without any declarations or glue code.  An older version of Scala also compiles to .NET.   Scala founder Martin Odersky (who co-designed Java Generics and implemented javac) has started blog on Artima today with his first entry on the history which led up to Scala:
Scala was designed to be both object-oriented and functional. It is a pure object-oriented language in the sense that every value is an object. Objects are defined by classes, which can be composed using mixin composition. Scala is also a functional language in the sense that every function is a value. Functions can be nested, and they can operate on data using pattern matching.
Earlier this year, Ted Neward also picked up on the "Ruby-esque" features of Scala and made three detailed blog entries introducing Scala, demonstrating it's brevity, and explaining it's object oriented design.

Key features, from the Scala homepage:
According to Martin, Scala has a small but growing community. "We currently see about 1000 downloads per month of the Scala distribution on our website."  Scala 2.1.2 was released this past April.

6 comments

Reply

Scala is cool by Jason Carreira Posted Jun 9, 2006 2:50 PM
Hmm without all the "end"s it looks like Python to me by Todd G Posted Jun 9, 2006 4:32 PM
Re: Entity escape issue in comment subject lines by Todd G Posted Jun 9, 2006 4:33 PM
JVM bytecodes by Binil Thomas Posted Jun 12, 2006 2:50 AM
Re: [OT] Haskell - by Dan Diephouse Posted Jun 12, 2006 4:45 PM
Re: [OT] Haskell -> JVM bytecodes by James Shipley Posted May 15, 2007 12:07 PM
  1. Back to top

    Scala is cool

    Jun 9, 2006 2:50 PM by Jason Carreira

    I started picking up Scala earlier this year around when Ted did, and it's definitely cool... I haven't had as much time as I'd like to dig in, and I got sidetracked on other functional programming topics like Monads, but I'm trying to make time to play with it some more. The functional stuff is definitely nice as it allows for some very concise code to do powerful things. I'm still finding it a bit tough to read compared to Java, though. Partly it's because I'm so used to Java, but partly it's because Scala is just more powerful and somewhat more complex.

  2. Okay I'm trolling a bit but I couldn't help myself. For my eyes the "end" keywords everywhere in Ruby visually distinguish it from Python at a quick glance. Otherwise they're so similar it's hard to tell at a [very] quick glance. But I sense Ruby-colored glasses around these parts ;-)

  3. See subject!

  4. Back to top

    JVM bytecodes

    Jun 12, 2006 2:50 AM by Binil Thomas

    While, we are on FP, does anyone know of a Haskell compiler that can generate JVM bytecodes?

  5. Back to top

    Re: [OT] Haskell -

    Jun 12, 2006 4:45 PM by Dan Diephouse

    Its not haskell per se, but I did see this: http://jaskell.codehaus.org/

  6. Back to top

    Re: [OT] Haskell -> JVM bytecodes

    May 15, 2007 12:07 PM by James Shipley

Exclusive Content

Rationalizing the Presentation Tier

Thin client paradigm characterized by web applications is a kludge that needs to be repudiated. Old compromises are no longer needed and it's time to move the presentation tier to where it belongs.

Agile Project Management: Lessons Learned at Google

In this presentation filmed during QCon 2007, Jeff Sutherland, the creator of Scrum, talks about his visit at Google to do an analysis of Google's first implementation of Scrum.

AtomServer – The Power of Publishing for Data Distribution

In this article, Bryon Jacob and Chris Berry introduce AtomServer, their implementation of a full-fledged Atom Store based on Apache Abdera, which is now available as open source.

An Introduction to Virtualization

It is easy to think that virtualization applies only to servers. In reality the recent resurgence of the concept is also being applied to networking, storage, and application infrastructure.

REST Anti-Patterns

In this article, Stefan Tilkov explains some of the most common anti-patterns found in applications that claim to follow a "RESTful" design and suggests ways to avoid them.

Choosing between Routing and Orchestration in an ESB

In this article, Adrien Louis and Marc Dutoo discuss the differences and relative merits of using orchestration vs. routing in a typical ESB setup, and discuss various implementation options.

Enterprise Batch Processing with Spring

Wayne Lund discusses batch processing, Spring Batch objectives and features, scenarios for usage, Spring Batch architecture, scaling, example code, failures and retrying, and the future roadmap.

User Story Estimation Techniques

Developer Jay Fields draws on his experiences as a ThoughtWorks consultant to describe effective user story estimation techniques.