The Artima Developer Community
Sponsored Link

Java Community News
Scala Language Version 2.1.2 Released

5 replies on 1 page. Most recent reply: Apr 4, 2006 8:09 PM by Bill Venners

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 5 replies on 1 page
Bill Venners

Posts: 2251
Nickname: bv
Registered: Jan, 2002

Scala Language Version 2.1.2 Released Posted: Apr 3, 2006 2:43 PM
Reply to this message Reply
Summary
Scala is an OO/Functional Language for the JVM and CLR that is designed to make working with XML easier.
Advertisement

The Scala language was mentioned last week in Artima's discussion forums, so I looked into it and it is quite interesting. It combines object-oriented with functional language features, runs on the JVM and CLR, and in particular is designed to make working with XML easier. In Scala Rational (PDF), Martin Odersky, Scala's designer, states that XML processing is a better fit for functional language constructs than object-oriented ones.

The Scala home page has a good quick overview of the language features, with links to more detail for each feature. There's also a good set of Scala documentation, a Scala FAQ, and of course the Scala download page.

In the Scala Rationale (PDF), Martin Odersky makes these two claims:

  • Claim 1: The raise in importance of web services and other distributed software is a fundamental paradigm shift in programming. It is comparable in scale to the shift 20 years ago from character-oriented to graphical user interfaces.
  • Claim 2: That paradigm shift will provide demand for new programming languages, just as graphical user interfaces promoted the adoption of object-oriented languages.

Do you agree?


Joao Pedrosa

Posts: 114
Nickname: dewd
Registered: Dec, 2005

Re: Scala Language Version 2.1.2 Released Posted: Apr 3, 2006 5:48 PM
Reply to this message Reply
I agree with him. The main idea is that in the Web there are many layers already, with HTML, JavaScript, Browser, Server, Database, sometimes XML (LOL), etc. The harder that you make the programming, the harder it will be to design and implement a winner application. You _CAN_ use the hardest programming language that you know, but it does not mean that you will convince Web Designers to use your hard methodology, mainly because such dudes create 5 or more applications in a year, and that's why some of them can afford and use Macs to help them to develop such applications, because they try to work independently from big corporations, even though they sell to them their services. :-)

Couple with that the knowledge that we have from OO languages now, after Java popularized it. Now we know for sure what OO can do for us, and how far we need to go in OO programming to create a good result.

Some people might say that Java let us view a little of what is possible with functional programming languages as well, mainly due to metaprogramming possibilities of Java and the powerful reflection that's available in it.

After all that, and lots of experimentation with Ruby, I know that Ruby is closer to fulfilling the needs of Web programming and other kinds of programming, because Ruby has almost perfect OO defaults and lots of metaprogramming and functional programming features. Ruby follows the standard syntax of most mainstream languages (people say Algol-like), so it's easier than a purely functional language for most people. Scala seems like a good option in Java-land for such features, but how to make it popular enough? How to write some libraries wrappers with it to make the Java libraries more tasteful to use in a more advanced language? I don't know.

Summing up, even though I agree with the claims, I disagree with the solution (I prefer an alternative). :-)

Ivan Lazarte

Posts: 91
Nickname: ilazarte
Registered: Mar, 2006

Re: Scala Language Version 2.1.2 Released Posted: Apr 3, 2006 10:11 PM
Reply to this message Reply
I'll agree that XML isn't a solved problem, but I don't think it has to get to the functional layer. Those languages have been out forever, and none scream "fully packed xml solution". In fact, I don't necessarily think being functional has anything to do with it. Clean is a general purpose language as is J.

I'll lump XML into whatever language ultimately produces a better SQL. SQL to me is insufficient at exploiting the power of a relational db, and ORM is another unfortunate layer on top of it, at best, an object convenience layer.
From that perspective, I'll agree, modern languages are a little too primitive to deal with xml.

I see similarities in them in that both are hierarchical, both are similar in that they deal with collections of items, and both demand querying, and altering. Who knows, maybe it's just a pipe dream to think those worlds would marry.

To me, a real xml language should be able to weave in and out of multiple xml documents, selecting items and running business logic in the same breath while writing the results to a new file if needed... Ideally it would also have a structured query approach like sql and feature it's ability filter, but at the same time not lose clear coding constructs. XPath on steroids? MetaXPath? Whichever the case, developers shouldn't be able to cobble together adhoc solutions. When's that coming out? :)

Bill Venners

Posts: 2251
Nickname: bv
Registered: Jan, 2002

Re: Scala Language Version 2.1.2 Released Posted: Apr 4, 2006 12:27 AM
Reply to this message Reply
> After all that, and lots of experimentation with Ruby, I
> know that Ruby is closer to fulfilling the needs of Web
> programming and other kinds of programming, because Ruby
> has almost perfect OO defaults and lots of metaprogramming
> and functional programming features. Ruby follows the
> standard syntax of most mainstream languages (people say
> Algol-like), so it's easier than a purely functional
> language for most people. Scala seems like a good option
> in Java-land for such features, but how to make it popular
> enough? How to write some libraries wrappers with it to
> make the Java libraries more tasteful to use in a more
> advanced language? I don't know.
>
Well I think the ability to call the Java libraries is a big plus for Scala, because lack of useful libraries usually a huge hurdle for new languages to overcome. But then it doesn't have much support in tools or IDEs, books that describe it, programmers that understand it, and so on, so it has a long way to climb to become popular. That doesn't mean people can't download it, play with it, and maybe even find some uses for it.

> Summing up, even though I agree with the claims, I
> disagree with the solution (I prefer an alternative). :-)

I thought Scala was interesting because it was a statically typed attempt at bringing functional and OO ideas together, and also because of its focus on XML. I like the static typing part, and would like to explore Scala when I get some time.

I had not been convinced that everyone will be writing distributed systems that exchange XML, though Martin Odersky's statement that "web services and other distributed software is a fundamental paradigm shift in programming" does have the ring of truth to me, just because so many things are being connected to networks, and we'll want to get them interacting.

Matt Hellige

Posts: 24
Nickname: hellige
Registered: Dec, 2005

Re: Scala Language Version 2.1.2 Released Posted: Apr 4, 2006 10:58 AM
Reply to this message Reply
Scala has a lot to offer, well beyond its XML support. To anyone who's tried to decouple and modularize a medium-to-large OO system, I highly recommend the Scalable Component Abstractions paper. In fact, I recommend it to everyone!

It's got some great examples, and I think it really shows some practical benefits of Scala's type system outside the domain of XML and web services. If the first part tries your patience, please at least take a look at sections 3 and 4 (the case studies).

Bill Venners

Posts: 2251
Nickname: bv
Registered: Jan, 2002

Re: Scala Language Version 2.1.2 Released Posted: Apr 4, 2006 8:09 PM
Reply to this message Reply
> Scala has a lot to offer, well beyond its XML support. To
> anyone who's tried to decouple and modularize a
> medium-to-large OO system, I highly recommend the
> Scalable Component Abstractions paper. In
> fact, I recommend it to everyone!
>
> It's got some great examples, and I think it really shows
> some practical benefits of Scala's type system outside the
> domain of XML and web services. If the first part tries
> your patience, please at least take a look at sections 3
> and 4 (the case studies).

Thanks for the link. It's rather thick stuff, but very interesting. The authors refer to Scala as a "concrete experiment" in this paper, and the extent to which Scala is an academic effort kind of shows through. But it really looks like something I want to explore.

Flat View: This topic has 5 replies on 1 page
Topic: Scala Language Version 2.1.2 Released Previous Topic   Next Topic Topic: Java on Snails Version 0.1 Released


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us