5 ms·
For Java I would suggest "Lisp is too powerful for Joe Programmer, and parentheses are scary" Java as essentially Lisp's bastard child is I think undermentione
by MBlume 13y ago
For Java I would suggest "Lisp is too powerful for Joe Programmer, and parentheses are scary"
Java as essentially Lisp's bastard child is I think undermentioned in language history.
- Scriptor 13y agoI know Guy Steele was part of Java's original design committee, but in what ways was Java at all "Lisp's bastard child".
- gruseom 13y agoSteele was brought in to write the spec. He didn't design Java. In fact, his classic talk "Growing a Language" is among other things a very polite and implicit, but devastating critique of the design of Java.
- cwzwarich 13y agoWhat Lisp influence is there in Java besides garbage collection? They differ on basically every other language design point.
- wonderzombie 13y agohttp://www.paulgraham.com/quotes.html http://www.paulgraham.com/quotes.html "We were not out to win over the Lisp programmers; we were after the C++ programmers. We managed to drag a lot of them about halfway to Lisp." - Guy Steele, Java spec co-author Reasonably original-ish source: http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/msg04045.html http://people.csail.mit.edu/gregs/ll1-discuss-archive-html/m.... Relative to C++, Java is actually a lot like Lisp. Don't forget that objects are a poor man's closures (and vice versa).
- cwzwarich 13y agoGuy Steele didn't actually design Java. He was hired after the language was designed to write the spec. Of course, writing a specification exposed problems with the design, and those problems had to be fixed, so he had some influence on those parts of the language. Dragging out that quote doesn't really answer the question. What about Java makes it like Lisp? The ability to (painfully) implement closures with objects and vice-versa? That's also shared with every other OO language, includes ones that would not normally be considered Lisp-influenced.
- wonderzombie 13y agoWhat other OO languages? Ruby is Lisp-influenced for sure. :) Anyway, the context is explicitly Java vs C++, not Smalltalk or Ruby or Python. I imagine if Smalltalk were the dominant platform this would've turned out differently. So let's do a compare and contrast. Java has the following properties: methods are all virtual; single inheritance; inheritance isn't public/private; final instead of const; GC and references w/o memory alloc or pointers; a package system exists; generics instead of templates; no operator overloading. And Java 6 does have a limited form of closures, believe it or not-- you can access a variable declared as final with an anonymous inner class. None of that is true of C++, and just about all of those substantially increase the complexity of the language. I don't even like Java, mind you, but after reading Effective C++ the influence of higher-level languages like Lisp was pretty obvious to me, even if Lisp might not have been the only or even primary influence on Java.
- MBlume 13y agoMaybe I'm overstating, and maybe there are other languages in between I don't know about. If you look at what's in memory at a given moment, how objects are connected to one another, and how they're connected to code, I don't think Java looks that different to Scheme; apart from continuations, macros, and TCO, you can write Scheme in Java if you're bloody-minded enough and don't mind your lambdas disappearing into masses of curly braces. Actually, looking at http://en.wikipedia.org/wiki/History_of_programming_languages http://en.wikipedia.org/wiki/History_of_programming_language... it turns out a lot of languages with the properties I'm describing came before Java, so while Java clearly descends from Lisp in a lot of ways, the connection isn't as direct as I was imagining.
- cwzwarich 13y agoScheme doesn't have that many distinguishing features: 1) Garbage collection 2) Dynamic typing 3) No distinction between primitive values and general values - a value can be used everywhere 4) Lexical closures and higher-order functions 5) A hygienic macro system 6) First-class continuations 7) Space safety guarantees for tail calls ('tail call optimization') 8) A numeric tower 9) S-expression syntax 10) A focus on cons cells and lists as primitive data structures There's probably something I'm missing, but the only feature that Java shares is the first.
- IgorPartola 13y agoJava is a cleaned up version of C++. The JVM is an implementation detail, albeit an important one. The language itself though is about removing the necessity to manually manage memory, but staying within the OOP paradigm (or the OOP paradigm C++ proposed).