This article is more than 1 year old

Gosling on C#, why X Windows sucks, and asparagus

'We just didn't understand how we were scaring the crap out of them'

No NeWS but bad NeWS

In the mid-1980s Gosling designed NeWS, a Postscript-based windowing system, which we humbly regard as one of the great aesthetic achievements of modern computing: along with the Amiga, BeOS and hardware LISP machines. NeWS lost the political battle to the X Consortium, but as recently as 1996 you could still buy NeWS-based printers from Sun.

Was he sore?

"It was a pretty gut-wrenching experience for me and for a lot of people.

"Every time I look at the X window system, it's so fucking stupid; and part of me feels responsible for the worst parts of it."

The rest of the UNIX world adopted the X Window System in 1990, and Sun followed suit, for a while promoting the OpenLook toolkit in preference to the designed-by-committee Motif library, before eventually going with the flow and standardizing on X/Motif in Solaris in 1992.

"They were going as far away from my design as they possibly could," he said.

How so?

"The color model and the fonts is aggressively stupid. It works, but oh my god. It's awful."

"For a lot of people inside Sun it was a coming of age thing, dealing with the competitive world. Sun was basically a bunch of graduate students - remember that the original hardware was Andy Bechtolsheim's Master's project.

"We were a tiny little company, we did this file system that became NFS. We were a small little group that no one even noticed, but people liked it, and it got adopted all over the place.

"Back then it was easy - no one thought of us as a threat. But later on NFS we became a threat to some people, particularly Digital Equipment Corporation. DEC in particular, in their corporate heart, really hated doing it."

Indeed, and DEC was the prime backer of the "third force" UNIX (i.e., it wasn't AT&T or BSD), OSF/1, which debuted on the first Alpha boxes, morphed into what today is known as Tru64 UNIX, but was never widely adopted.

"When NeWS was ready we sprinkled it around. But there was this group of companies that said 'we're not going to be NFS'd again'. And at Sun, from NFS we leant this false lesson That best summed up in Scott's canonical description as a game of chicken, where the other guys flashed their headlights and we got off the road."

"People were, like, angry at as: not because we scared the crap out of them. It's just that we didn't understand how we were scaring the crap out of them. So in a strong sense with Java it was a learning process for us - there was some tech learning - but the most important learnings were social or behavioral things."

This ingenue perspective is an antidote to the view of Sun as the voracious, rampaging start-up which turned the enterprise hardware business inside out in the 1980s, and it's a perspective that's almost certainly alien to anyone who's entered this business in the last five years, in which Sun has been waging a war - phoney or otherwise - as the underdog against Microsoft. (Old hands who lived through this era are welcome to contribute to our mailbag.)

Wrath of The Beast

So what about C#, we wondered? Did it make him feel flattered, or as mad as hell?

Gosling is a good-natured Canadian, and he set about the competition with the same relish that his countrymen have for clubbing baby seals:

"It's a mixture of being flattered, annoyed and amused.

"It would have been much more interesting if they had done something creative. But it was so derivative."

Well, we mused, you could hardly expect The Beast to come up with a LISP machine, could you, ha ha?

"No, but they could have been more creative than that.

"In a way they shot themselves in the foot by committing to support C and C++. That had really negative implications for the security story.

"Typically they don't care about security but the major issue is the completely unrestricted memory model. It allows you to do any abuse of data structures, and those abuses look more legitimate.

"In C there are no data structures: there are pointers and pointer arithmetic. So you have a pointer into a data structure. Now with an array you can easily go off the end of a data structure, or use casting, to trick the program into treating an image as an executable file.

"The cost in reliability is really huge. Over-running an array is such a straight forward thing to do. The canonical break involves some buffer overrun errror.

But hasn't Microsoft got some traction by promising that the CLR supports many languages, not just Java?

"Java the language is almost irrelevant. It's the design of the Java Virtual Machine. And I've seen compilers for ML, compilers for Scheme, compilers for Ada, and they all work. Not many people use them, but it doesn't matter: they all work," he said.

"But the JVM spec is really, really anal about the memory model. There's a piece of the JVM called the verifier, that inspects pieces of byte code - it checks whether this or that piece of code will do what it's supposed to do. If you have private variables, they should be private"

The JINI hype

"That got out of hand. Jim Waldo has been driver behind that, and it's great technology. But we had a horrible problem - the Jini guys were doing their stuff, and they learnt that Wired was going to do an article on it. Since Bill [Joy] had been somewhat involved they got Bill to talk to the press so they got something close to the truth in what they wrote."

"Jini has had some big wins and it's part of some pretty big systems."

(Gosling later suggested Jini would be a good choice for some of the P2P technical issues being confronted by the hacker underground, such as Wiki Wiki Wan, and he has a point).

We mentioned the Java Toaster, which we first reported a year ago, and which subsequently got a huge amount of press from the BBC and the US networks [see this page for pictures]. Did this pop his clogs, say, more than the tools work on which he now focuses?

"I saw that. It's a lovely idea. But things are getting even smaller now - if you look at the JSTAmp boards that are in these sumo bots, they've got ethernet on board, in the embedded controller. They use JSTAMP. And the JSTICK board is even smaller."

And to cut a real-time story short, that's where we left it. ®

More about

TIP US OFF

Send us news


Other stories you might like