============== FIRST ============== Return-Path: Date: Thu, 31 Jul 2003 15:30:45 -0700 From: James Gosling <> Subject: Fwd: Mac OS X Java Performance To: java-dev@lists.apple.com Message-id: MIME-version: 1.0 X-Mailer: Apple Mail (2.552) I realized from some comments I've gotten (and an error message from a mailer that I missed!) that some intermediate state in the conversation got lost. Here's my initial respose. I apologize for the high flame temperature. Begin forwarded message: > From: James Gosling > Date: Wed Jul 30, 2003 1:31:12 PM US/Pacific > To: Todd Blanchard > Cc: java-dev@lists.apple.com > Subject: Re: Mac OS X Java Performance > > What a troll-ish set of remarks based on zero knowledge and spreading > massive falsehoods. Normally I don't respond to such drivel, but this > time, if feels like I have to: > >>> From: Todd Blanchard >>> Subject: Re: Mac OS X Java Performance >>> >>> No, as I understand it he is a C developer. > > It is true, I have been a C developer, and I still do occasionally. > But I have also developed code in C++, Fortran, Algol, SNOBOL, Mesa, > Smalltalk, Pascal, Modula, Simula, Cobol, Basic, Focal, BLISS, PL/1, > Pearl, several versions of Lisp, and assembler code for x86, Sparc, > PowerPC, IBM 360/370, CDC 7000(CPU and PPU), PDP {8,10,11,VAX} and a > bunch of stuff too obscure for me to remember at all. Of that lot > I've probably written the most in C - at least 500K lines of C written > by me, personally, over a couple of decades. For the last decade I've > written almost zero C code and write almost exclusively in Java. > >>> Apart from throwing T-shirts, he hasn't done any work with Java >>> lately. > > One could start a Clintonian debate on the use of the word "with". > Almost everything I write is in Java these days. I mostly work on > things other than the compiler or the JDK release. > > This is the piece that makes my blood boil: >>> He designed Java so marginally capable developers could have a job. >>> Hence all the annoying little limitations that slow down development >>> but prevent errors (and features). He finds it too limiting to use >>> himself. I can't really blame him. > > This is so damned false I don't know where to begin. I designed Java > so I could write more code in less time and have it be way more > reliable. In the past I've wasted huge numbers of hours chasing down > memory smashes and all the other time wasters that are so typical of > what happens when writing C code. I wanted to spend time writing > code, not debugging. Life is too short for debugging. All of those > little "limitations" turn out to be things that make coding faster and > debugging vanish. > > For example, lots of newbie's coming in from the C world complain > about exceptions and the fact that they have to put exception handling > all over the place - they want to just write their code. But that's > stupid: most C code never checks return codes and so it tends to be > very fragile. If you want to build something really robust, you need > to pay attention to things that can go wrong and most folks don't in > the C world because it's just to damn hard. > > One of the design principles behind Java is that I don't care much > about how long it takes to slap together something that kinda works. > The real measure is how long it takes to write something solid. Lots > have studies have been done on developer productivity, and Java beats > C and C++ by a factor of 2. > > It's kinda like the evolution of the airplane. Once upon a time when > folks scooted around in open cockpit biplanes they navigated by > sticking their heads out over the side of the plane and looking down. > When covered cockpits with windows were first introduced pilots didn't > like them because there was no way to stick their head out. But if > they had won the argument, they'd never be able to fly at Mach 1 or at > 30,000 feet. Stick your head into a Mach 1 airflow and see what the > bloody stump looks like. I want to fly at Mach 1. I'll take the > windows. > >>> On Sunday, July 27, 2003, at 02:55 PM, John Gage wrote: >>> >>>> I've forgotten, is Gosling a Java developer? If he is, why does he >>>> use a Mac? Masochism? "A state of denial"? > > I use the MAC because it's a great platform. One of the nice things > about developing in Java on the MAC is that you get to develop on a > lovely machine, but you don't cut yourself off from deploying on other > platforms. It's a fast and easy platform to develop on. Rock solid. > I never reboot my machine... Really! Opening and closing the lid on > a Powerbook actually works. The machine is up and running instantly > when you open it up. No viruses. Great UI. All the Java tools work > here: NetBeans and JEdit are the ones I use most. I tend to think of > OSX and Linux with QA and Taste. _______________________________________________ java-dev mailing list | java-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting Do not post admin requests to the list. They will be ignored. ============== SECOND ============== Return-Path: Date: Wed, 30 Jul 2003 16:35:18 -0700 From: James Gosling <> Subject: Re: Mac OS X Java Performance In-reply-to: <6E05D6D8-C2D4-11D7-A5CA-0030657E2F34@mac.com> To: Todd Blanchard <> Cc: java-dev@lists.apple.com Message-id: <7AA5162C-C2E6-11D7-A5D2-000393903C9E@sun.com> MIME-version: 1.0 X-Mailer: Apple Mail (2.552) Thanks for cranking the flame temperature down. Here are some more comments: On Wednesday, July 30, 2003, at 02:26 PM, Todd Blanchard wrote: > OK, so I heard wrong. > > Nice list of languages - I've only got Basic, FORTRAN, C, C++, > Smalltalk, Objective C, and Java. Yea. It's pretty frightening. But I started collecting a paycheck as a hacker in 1969, so it's kinda unavoidable. > > Of these I like C, Smalltalk and Objective C (its a really good > compromise). C because of its minimalism for high performance work. One of the things that is not weel understood is that a good measure of C's minimalism is a result of the constraints of the environment: the first C compiler ran on a system where the maximum process size was 32K. Within that constraint, they did a masterful job. > For the others, the key feature is message sending vs function > calling. DoesNotUnderstand is a very powerful thing. > > My impression of Java is that there wasn't enough budget to do it > right or you were trying really hard to appeal to C++ developers. > Compared to Smalltalk, its not very flexible and its less productive. > For instance, I still have the compile edit printf cycle (debuggers > have been kind of a disappointment in Java). One could have a long debate. There were no budget issues that inhibited "doing it right". I'd argue that is was done right. Appeasing C++ developers was a concern, but it was a small one. A bigger concern was balancing flexibility and performance. I wanted to get as much as possible of the flexibility of languages like Smalltalk or Lisp, with as much as possible of the permance of C and C++. I think we've done very well. Hotspot benchmarks frequently beat C these days - the only real performance issue we have these days is startup time., which has been getting much better. Flexibility is also a matter of debate. Smalltalk and Lisp's flexibility is good for prototyping, but problematic for producing robust production code. Many things that sometimes feel restrictive in prototyping (classes/interfaces as strict contracts; Excepetions; ...) turn out to be liberating in production contesxts. Java is definatly biased towards producing production code. > > On Wednesday, July 30, 2003, at 02:31 PM, James Gosling wrote: > >> This is so damned false I don't know where to begin. I designed Java >> so I could write more code in less time and have it be way more >> reliable. > > Yeah, this is why Dave Winer wrote Frontier - his own dynamic language > all his blog stuff is built on. He uses it all the time now - I can't > say it appeals to that many people. I find it really weird for > instance. > >> In the past I've wasted huge numbers of hours chasing down memory >> smashes and all the other time wasters that are so typical of what >> happens when writing C code. I wanted to spend time writing code, >> not debugging. Life is too short for debugging. All of those little >> "limitations" turn out to be things that make coding faster and >> debugging vanish. > > Perhaps you should download Squeak sometime. Just to see where I'm > coming from. If you compare Java to C++ - no argument its a huge > improvement. BTW, the Squeak guys felt the same way and wrote the VM > in Smalltalk. Then they wrote a translator to C. It gets debugged in > Smalltalk though. I recommend Dan Ingall's paper "Back To The > Future". ftp://st.cs.uiuc.edu/Smalltalk/Squeak/docs/OOPSLA.Squeak.html > > Incidentally, this puts the lie to the idea that you need primitive > types. You don't. Depends on your performance goals. Uniform type systems are easy if your performance goals aren't real strict. In the java case, I wanted to be able to compile "a=b+c" into one instruction on almost all architectures with a reasonable compiler. The closest thing I've seen to accomplishing this is "Self" which gets close, except that the compiler is *very* complex and expensive, and it doesn't get nearly all the cases. I haven't read any of the squeak papers, so I can't comment on it. > They just complicate things. Which brings me to my favorite Java > bug: > > new Long(5).equals(new Integer(5)) returns false?!?! But long x = 5; > int y = 5; (x==y) evaluates to true. Seems pretty inconsistent. I basically agree with you here, but it's a long debate. > >> One of the design principles behind Java is that I don't care much >> about how long it takes to slap together something that kinda works. >> The real measure is how long it takes to write something solid. Lots >> have studies have been done on developer productivity, and Java beats >> C and C++ by a factor of 2. > > No argument there. But that's not what I'm comparing it to. To me > working in Java feels like running in heavy boots. > > I'm glad you like it though. > > -Todd Blanchard _______________________________________________ java-dev mailing list | java-dev@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting Do not post admin requests to the list. They will be ignored.