aspose file tools*
The moose likes Scala and the fly likes Scala, java done right? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Languages » Scala
Bookmark "Scala, java done right?" Watch "Scala, java done right?" New topic
Author

Scala, java done right?

Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Anybody playing with Scala? It seems interesting. It generates code that runs on a Java JVM, but is a more pure OO language, and leaves out the left over cruft from C, everything is an object.

I thought that generics were ugly and inconsistant, and closures seem to be worse.

I remember when Java was a nice, clean little language
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Too much meaning for this Drivel forum.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Originally posted by Mark Spritzler:
Too much meaning for this Drivel forum.


I'll grant that it could potentially have too much meaning.

I'm amazed that I had not heard of scala until just a few days ago.

Java's inner classes are really far too complex, and generics, while useful, were clearly grafted on with much too much concern for backwards compatibility and no concern for aesthetics. I believe code should look good, in addition to working.

I did some professional Smalltalk, and liked it. So I'm ready for something beyond java.

No idea if scala is it, or perhaps python or lua
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300
    
    6

I think its funny how we are coming full circle when it comes to language features. Pretty soon we'll all be talking about J-ssembler and Jails.


GenRocket - Experts at Building Test Data
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Originally posted by Gregg Bolinger:
I think its funny how we are coming full circle when it comes to language features. Pretty soon we'll all be talking about J-ssembler and Jails.


The observation has been made that the advent of C set computer science back by a couple of decades. So much of what has happened since then has really just been reinventing the wheel. Of course, many of the "old wheels" were written in "write-only" languages -- but still: so much very sound research was ignored for ages just because of its association with pre-UNIX computing.


[Jess in Action][AskingGoodQuestions]
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Originally posted by Ernest Friedman-Hill:
The observation has been made that the advent of C set computer science back by a couple of decades.


C is just PDP-11 assembler with some eye candy.

I have been saying for decades that C was the grade that the language would get if presented in a graduate language design class.

But we have it, and it crept into Java. Without int and for loops, I don't think Java would have had a prayer of being accepted.

One of the applicable observations from early 1980s word processors was that magazines and purchasing departments evaluated WordStar against WordPerect by the feature checklist. Does it have "automatic paragraph numbering" check or no check. The predictable and obvious result is Word, which can do nearly anything that page layout programs can do, but 90% of the users only use 10% of the features.

Adding more cruft to Java doesn't seem to be a winner to me. YMMV, etc.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Scala has been here for a while actually. As for java being complex if you use simple generics and avoid closures (not that they are part of the language yet) it should still be a language you love. There are some things that java still lacks but I dont think it is that much of a pain.


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Originally posted by John Meyers:
As for java being complex if you use simple generics and avoid closures (not that they are part of the language yet) it should still be a language you love.


My problem with Java is not what it lacks, its what it has.

And while 'simple generics' may be possible, I find that they get complex quickly. I could handle the complexity, but the syntax is an ugly afterthought.

I don't blame Java for being what it is, it was a nice language in 1997. It only became a success because of the compromises to win acceptance by the C-users. But I'm tired of it being somewhat OO and somewhat not.

I'm tired of it changing the language to reflect the current fad thinking.

Annotations are just plain ugly, IMHO.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

while 'simple generics' may be possible, I find that they get complex quickly


Yes, it starts getting weird when you use those '?' and "super"s. Sometimes its very difficult to understand

Annotations are just plain ugly, IMHO.


They sometimes are. Sometimes they confuse me. Should I look at the xml or the annotations to find out which type of bean I am dealing with or what kind of transaction it has ? arrgghhh.

I still like java. I think I would still like it if they were to add closures. But I certainly would not use them
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14430
    
  23

Closures are difficult to get right. I haven't followed all the closures proposals for Java in detail, but after seeing this talk by Joshua Bloch at JavaPolis 2007 I'm not so sure anymore that it's a good idea to add closures to Java.

Besides closures, he talks about some history of Java, about "the feel of Java", and why adding more and more features like generics and closures might not be such a good idea.

Interesting link: Talk about Scala by Martin Odersky (the inventor of Scala).


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Originally posted by John Meyers:
Yes, it starts getting weird when you use those '?' and "super"s. Sometimes its very difficult to understand


It gets worse, sometimes the <T> and ? go before the return value, to help bind things. So you have to know what you are looking at to know what it is.
This gets to be a bit of a catch-22.

I've got a personal project, fairly large Java that I'm working on restoring it, adding lots of javadoc and junit stuff. Once its solid, I think I'll try porting it to scala as an exercise.
Denise Willington
Greenhorn

Joined: Apr 08, 2008
Posts: 2
Never tried playing with it
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scala, java done right?