The Artima Developer Community
Sponsored Link

Weblogs Forum
Ruby and Scala

17 replies on 2 pages. Most recent reply: Apr 8, 2007 11:54 PM by Kaveh Shahbazian

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 17 replies on 2 pages [ 1 2 | » ]
Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Ruby and Scala (View in Weblogs)
Posted: Sep 8, 2006 12:32 PM
Reply to this message Reply
Summary
I've decided to just bite the bullet, get the pickaxe book, and slowly work through it during morning coffee breaks at Camp4 Coffee (a venerated Crested Butte establishment that is one of the centers of social discourse -- those of you who have come here for workshops know of which I speak).
Advertisement
(Camp4 seems to be the only place where I can actually get through technical books). One of the big reasons for my renewed interest in Ruby (besides the features it has that seem to make it a bit easier to create domain-specific languages) is because of Matz's decision to remove the Perlisms in Ruby. Any language (Python is the only other one I know of) that's willing to REMOVE warts (Java just seems to keep adding warts on existing warts) immediately becomes much more interesting in my perception. I also think that I may learn some concepts in Ruby that I can apply in Python even if I don't end up using Ruby. For example, I'm interested in the differences in Ruby continuations vs. the coroutines supported by Python 2.5's modified yield statement, and in understanding why Guido decided that full continuations were problematic.

Yesterday I spent about 1/2 hour looking at the Scala programming language with Bill Venners (who recently wrote a weblog entry on Artima about how the joy had gone out of Java programming for him -- a big admission from such a dedicated Java programmer). This is specifically designed to work on top of the JVM, but with much higher-level concepts and more succinct coding (type inference, for example). The most interesting thing to me about Scala is the built-in support for agent-based programming (although the last time I looked, that part of the tutorial hadn't been written yet). But other parts of the language, in particular its support for functional programming, is also quite interesting. Bill especially liked the idea that he could use standard Java components (or pay for standard Java programmers to build such components), but consume them with a more productive language like Scala, which still has static type checking and so fit his needs better.


Kay Schluehr

Posts: 302
Nickname: schluehk
Registered: Jan, 2005

Re: Ruby and Scala Posted: Sep 8, 2006 12:54 PM
Reply to this message Reply
A few days ago there had been an announcement of smoking a peace pipe:

http://rupy.wmid.amu.edu.pl/index.html

For people who are annoyed by self gratifying language communities this invitation could be interesting.

John Cowan

Posts: 36
Nickname: johnwcowan
Registered: Jul, 2006

Re: Ruby and Scala Posted: Sep 8, 2006 2:55 PM
Reply to this message Reply
I found trying to read the Scala docs painful, because it is upward compatible with Java, so there are all the Java things and then new Scala things intertwingled with them. IMHO they should have stopped trying to make arbitrary Java programs compile as Scala.

Marcin Mielżyński

Posts: 5
Nickname: lopex
Registered: Jan, 2006

Re: Ruby and Scala Posted: Sep 8, 2006 4:08 PM
Reply to this message Reply
What kind of Perlisms in Ruby bother You the most ? Are they the $whatever variables? It is very easy to get rid of them.
I think that one line condititions/loops or =~ and /regexp/ should stay. The last ones are just a method and a contruction literal, they fit quite well in Ruby's semantics. Should we get rid of array and hash contruction literals as well ? What about Java {} literal for arrays...;) ?

Todd Blanchard

Posts: 316
Nickname: tblanchard
Registered: May, 2003

Re: Ruby and Scala Posted: Sep 8, 2006 8:57 PM
Reply to this message Reply
Ruby is pretty cool - but after messing with it for awhile I still feel like I'm working with one hand behind my back. Its still dead code in files. Once you've worked on a live object system, there's no going back.

I'll stay with Squeak/Seaside.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Ruby and Scala Posted: Sep 8, 2006 9:06 PM
Reply to this message Reply
> What kind of Perlisms in Ruby bother You the most ? Are
> they the $whatever variables? It is very easy to get rid
> of them.
> I think that one line condititions/loops or =~ and
> /regexp/ should stay. The last ones are just a method and
> a contruction literal, they fit quite well in Ruby's
> semantics. Should we get rid of array and hash contruction
> literals as well ? What about Java {} literal for
> arrays...;) ?

I understand that it's possible to avoid them in your code. But I don't want to have to read them in other people's code. The changes Matz is planning will mean that all new Ruby code will be (for me) more readable. And I admire his decision to do this, a lot.

Bruce Eckel

Posts: 875
Nickname: beckel
Registered: Jun, 2003

Re: Ruby and Scala Posted: Sep 8, 2006 9:11 PM
Reply to this message Reply
> A few days ago there had been an announcement of smoking a
> peace pipe:
>
> http://rupy.wmid.amu.edu.pl/index.html
>
> For people who are annoyed by self gratifying language
> communities this invitation could be interesting.

That's great. I've decided that it doesn't matter whether people are learning Ruby or Python. The important thing is the sea change towards the acceptance of dynamic languages (well, Perl obviously has been widely used, but I mean languages that have full and straightforward support for OO and other higher-level concepts, and that can be used for large-scale programming), and the much greater productivity that ensues. Also, the expansion of thought about programming concepts and design that it engenders.

Andrew Binstock

Posts: 9
Nickname: binstock
Registered: Sep, 2006

Re: Ruby and Scala Posted: Sep 9, 2006 1:02 AM
Reply to this message Reply
If you want a great scripting language that runs on the JVM and is, IMHO, more approachable than both Ruby and Scala, try Groovy. I think you'll be pleasantly surprised. (And it even has closures ;-)

If you have time/inclination to explore for the fun of it, Lua is a great language and far faster than Ruby--in fact, faster than all scripting languages. It also has the advantages of good tools, an active community, and wide use (especially by gamers, who need fast scripting). Plus several very readable tutorials.

Peace!

Martin Odersky

Posts: 84
Nickname: modersky
Registered: Sep, 2003

Re: Ruby and Scala Posted: Sep 9, 2006 4:08 AM
Reply to this message Reply
> I found trying to read the Scala docs painful, because it
> is upward compatible with Java, so there are all the Java
> things and then new Scala things intertwingled with them.
> IMHO they should have stopped trying to make arbitrary
> y Java programs compile as Scala.

I am not sure what you mean. Certainly, Scala is not upwards compatible with Java; no Java program will compile with the Scala compiler. However, Scala tries to interact smoothly with Java on the bytecode level. There's a price to pay in that we have to be able to somehow interpret every construct in Java's libraries as if it was a (possibly differently spelled) Scala concept. Maybe that's what you were referring to?

I agree that this is a burden, in particularly for the people who have to specify and implement the language.
But on the other hand, users get full access to the huge set of Java libraries and frameworks. Scala is intended specifically for the JVM environment, rather than competing with more independent languages such as Ruby, Python, Smalltalk, OCaml, Scheme or Haskell (which I personally find all rather nice). It's also specifically intended to be statically typed, but that's another debate...

Grant Olson

Posts: 3
Nickname: granto
Registered: Jul, 2006

Re: Ruby and Scala Posted: Sep 9, 2006 8:21 AM
Reply to this message Reply
I haven't been actively following ruby. Could someone post a link that explains what perlisms are being yanked out? A few google searches came up short.

Isaac Gouy

Posts: 527
Nickname: igouy
Registered: Jul, 2003

ebb and flow Posted: Sep 9, 2006 9:28 AM
Reply to this message Reply
The important thing is the sea change towards the acceptance of dynamic languages...
Maybe a sea change, maybe just a return to the ordinary ebb and flow that existed before the Java tsunami.

James Watson

Posts: 2024
Nickname: watson
Registered: Sep, 2005

Re: Ruby and Scala Posted: Sep 11, 2006 6:18 AM
Reply to this message Reply
> I found trying to read the Scala docs painful, because it
> is upward compatible with Java, so there are all the Java
> things and then new Scala things intertwingled with them.
> IMHO they should have stopped trying to make arbitrary
> Java programs compile as Scala.

I've been bugging Martin and the Scala crew about the ScalaDocs. They need to highlight abstract members and list all inherited members.

It seems like there is a need for volunteers to improve the documentation in Scala. The Scala Reference document is too BNF-centric. That's great for compiler writers but is not very helpful to users. The Scala by exmple and Scala Tutorial documents are helpful but their coverage is not complete.

Martin Odersky

Posts: 84
Nickname: modersky
Registered: Sep, 2003

Re: Ruby and Scala Posted: Sep 11, 2006 9:25 AM
Reply to this message Reply
> It seems like there is a need for volunteers to improve
> the documentation in Scala. The Scala Reference document
> is too BNF-centric. That's great for compiler writers but
> is not very helpful to users. The Scala by exmple and
> Scala Tutorial documents are helpful but their coverage is
> not complete.

You are completely right. Things are coming into place, but more slowly than we'd like to. We have currently about 10 people who between them have to do language spec, compiler, tools, libraries, the web site and the documentation. We
certainly use more contributors, in particular for tools, libraries and documentation.

Tom Davies

Posts: 1
Nickname: tgdavies
Registered: Oct, 2006

Re: Ruby and Scala Posted: Oct 10, 2006 5:19 AM
Reply to this message Reply
Here's another interesting JVM based language -- very similar to Haskell. Unfortunately it isn't quite available yet, and licencing is up in the air...

http://quarkframework.blogspot.com/

narayan iyer

Posts: 1
Nickname: iyerland
Registered: Oct, 2006

Re: Ruby and Scala Posted: Oct 12, 2006 7:19 PM
Reply to this message Reply
Have you tried Nice programming language, also compiles to JAVA VM, and has some cool functionalities.

Flat View: This topic has 17 replies on 2 pages [ 1  2 | » ]
Topic: Ruby and Scala Previous Topic   Next Topic Topic: Code Generation: The Real Lesson of Rails

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use