views:

653

answers:

6

These two languages are very different. They're each well-suited to their own particular tasks. What tasks are easy to do in Java, yet are hard / require lots of ugly code to do in Scheme? Another way of putting it: what is Java better at?

If you can think of things that Scheme is better at, see this question.

EDIT: This pair of questions has gotten about 14 upvote/downvote pairs. It's interesting that this is so controversial. I want to make a disclaimer that I don't mean this as flamebait.

+2  A: 

Everything you do in Java is hard to read in Scheme. Everything you do in Scheme is simpler than in Java--once you understand it.

Patrick Szalapski
+36  A: 

Finding a job.

stesch
Ha! Thanks for the laugh! +1
erickson
*reluctant upvote* :-(
Kyle Cronin
Easy. Teach it!
soegaard
Scheme on a resume is never a bad thing.
Jonathan Arkell
@Jonathan Arkell: Companies which would recognize this as not being a bad thing would be even better.
stesch
+5  A: 

Making apps that run in a web browser.

Most people have the JRE already installed, so you can run Java code in someone's browser (the client-side), complete with JRE libraries. To run Scheme code, you have to use a Scheme interpreter written in JavaScript. JavaScript has fewer permissions because it is sanboxed more strictly. Any libraries must be included explicitly.

Jonathan Tran
not true - PLT Scheme comes with a web language which actually is very pleasant to work with. (you do need to run that web server, it's true)
Claudiu
I'm pretty sure he meant Java Applets, not server side applications.
Andrew Gwozdziewycz
SISC is a Scheme implementation that runs on the Java VM. See the SISC web-site for a demonstration.
soegaard
@andrew: good point, i missed that.
Claudiu
I stand corrected. Should I remove my answer then? I'm really wondering... there's got to be _something_ Java is better at. Right??? What is it?
Jonathan Tran
+3  A: 

Swing makes Java one of the easiest languages to create nice GUI's fast, so, general GUI-programming.

Pål GD
Non sequitur - just because Java has something doesn't mean that Scheme doesn't.
Svante
Well that's sort of the whole point of the question. It's not asking what one language could theoretically have. If the GUI libraries for Scheme exist but are immature or somehow hard to use relative to the Java ones, then I'd say that counts.
Jonathan Tran
Nice GUIs ... Java?
troelskn
+1  A: 

Hiring a junior developer who already knows the language.

Darron
+1  A: 

Using the gazillion Java libraries out there (this can be a good or a bad thing)

JBF
But there are of course solutions to this (just harder in Scheme than in Java), that is running Scheme in Java
JBF