• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scala, java done right?

 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Too much meaning for this Drivel forum.

Mark
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15441
41
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never tried playing with it
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic