Interview with Martin Odersky on Clojure and Scala

  • (2 Pages)
  • +
  • 1
  • 2

19 Replies - 10403 Views - Last Post: 11 August 2010 - 02:06 PM

#16 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Interview with Martin Odersky on Clojure and Scala

Posted 08 August 2010 - 11:12 PM

Yes. Java's standard library is readily accessible from Clojure, including Swing. Nothing special has to be done to make those available, they are just there.

There are also some Swing wrappers like clj-swing around to make creating Swing applications a little simpler and more Clojury. Not sure how complete any of them are though. I've never used them.

It's easy, albeit a little different from what you're used to, to use Swing from Clojure, even without wrappers. I believe that ociweb tutorial I liked to in the resource thread has a brief straight-up Swing example.

EDIT: Made that blog post: http://www.dreaminco...hat-is-clojure/

This post has been edited by Raynes: 08 August 2010 - 11:28 PM

Was This Post Helpful? 1
  • +
  • -

#17 WolfCoder  Icon User is offline

  • Isn't a volcano just an angry hill?
  • member icon


Reputation: 782
  • View blog
  • Posts: 7,610
  • Joined: 05-May 05

Re: Interview with Martin Odersky on Clojure and Scala

Posted 09 August 2010 - 01:26 PM

Installation into Eclipse was easy enough. This should have been the language they taught at my school because EMACS+Scheme/Haskell was 80% all of us trying to get it to work in the first place and wrestle with console text editors. Clojure is much more practical and you can actually use it for things right out of the box. The problem I saw was that most of the students just didn't get the point and they learned just what they needed to get the grade they wanted, even turning them off from declarative programming.

The ECLIPSE editor + terminal makes a much better REPL than most things.

This post has been edited by WolfCoder: 09 August 2010 - 01:28 PM

Was This Post Helpful? 0
  • +
  • -

#18 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Interview with Martin Odersky on Clojure and Scala

Posted 09 August 2010 - 06:49 PM

I'm happy you didn't have any problems with that. I tried out the Eclipse plugin like a year ago or longer, and it was okay except it didn't yet support auto-indentation. I believe I heard Laurent saying that he added that not-so-long ago though.

Indeed, the biggest mistake any language can make is to expect people to abandon their favorite development environments simply because they think Emacs/Vim is better. If you're learning a language, you probably don't want to have to learn an editor at the same time.

If you get frustrated with not having history and stuff when you run the REPL in a terminal, check out stuff like cljr, Leiningen, and Cake. They all offer ways to run an REPL with stuff like JLine and other fun things. Not sure how that stuff will work on Windows, but surely there is something that'll give you a better terminal REPL.
Was This Post Helpful? 0
  • +
  • -

#19 pchapin  Icon User is offline

  • New D.I.C Head

Reputation: 34
  • View blog
  • Posts: 43
  • Joined: 23-July 10

Re: Interview with Martin Odersky on Clojure and Scala

Posted 11 August 2010 - 01:20 PM

I'm coming to this thread a little late and I apologize for that. I just wanted to say that I'm a Scala user and I enjoy the language quite a bit. However, it's also on my to-do list to learn Clojure.

To answer the previous post... yes... you can expect any JVM language to be able to interact with Java libraries in a natural way. Certainly that is true for Scala and I assume Clojure as well. Thus you can use these new languages without throwing away your investment in Java code or rewriting the support libraries you might already be using. In my project I'm calling an ANTLR generated parser in Java from my Scala code and it all works just fine.

Scala is much more concise than Java. It uses static type checking, which I tend to prefer, but it also has significant support for type inference so that you don't have to write as many type annotations as in Java. It also has good support for both the functional and object oriented paradigms.
Was This Post Helpful? 0
  • +
  • -

#20 Raynes  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 611
  • View blog
  • Posts: 2,815
  • Joined: 05-January 09

Re: Interview with Martin Odersky on Clojure and Scala

Posted 11 August 2010 - 02:06 PM

I believe the only time you have to write type annotations in Scala is for function parameters. Kind of weird. Of course, if you use a dynamically typed language like Clojure, you never have to write type annotations. :angel:

EDIT: I always edit my posts.

This post has been edited by Raynes: 11 August 2010 - 02:07 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2