Jackpot - James Gosling's Latest Project
Pete Bevin writes "Artima has a fine interview with James Gosling, creator of Java, about his latest project. It's called Jackpot, and it treats the parse tree as the program. This makes refactoring much, much more intuitive. The article has some good insights into code visualization, technical writing, and making your programs more understandable."
So you can write what is kind of like a reverse grammar, where you associate structural patterns with what you can think of almost as TeX descriptions of how to represent the patterns graphically. What you see on the screen has been generated from this pattern matching. So we can, on a user chosen basis, turn various program structures into all kinds of visual representations.
:)
Why, methinks he's reinvented the Matrix.
This type of thing has been thought of before, such as Intentional Programming at Microsoft Research (now at intentsoft.com) or aspect programming at PARC
that's great and all, but if i can't have my AWT, forget it...
well, it's nothing one behind the ear wouldn't cure
Always document your code so that a mentally retarded 6 year old can understand what you mean.
I learned that when doing math proofs. It it wasn't written so retarded 6 year old can understand it, the TA took off marks.
I don't know much Java, but .NET has an entire CodeDOM namespace that can be used to generate assemblies and code on the fly. DOM being the keyword - it presents C# code as a parsed object tree. I haven't played with it beyond generating simple assemblies but I wonder if it could be somehow cajoled into creating a tree representation that also understands flow. That would be a neat thing to play around with.
"Creator of Java"? What's that? How about "the creator of Gosling Emacs"?
I've heard that somewhere before...
Oh yeah. In my ANSI Common Lisp book. Something about the real power of Lisp being that everything, including the program itself is just a tree structure.
I guess programming languages really are slowly merging. Java isn't getting macros now, but I suspect in another 5 or 10 years it'll be something else Java will do. =)
-Ducky
"Complexity is in many ways just evil. Complexity makes things harder to understand, harder to build, harder to debug, harder to evolve, harder to just about everything."
So says the creator of Java. I wonder if he's bothered to browse the API lately?
Does this mean it will be any easier for me to learn Java? Probably not. Will I ever learn Java? Of course. Let's be honest, Qweez No. Probably not.
It is a SMTP honeypot used to trap spammers. This is going to cause problems between the two groups. How will they be able to tell which one is which. It will be like when no one could tell the diff between the two Phoenixes.
... it sounds to me like he is reinventing Lisp.
-- Repeat with me: "There is no right to profits".
Not trying to troll. Microsoft used to have a product group working on this same type of idea (that you could program by editing the parse tree). Does anyone remember what the group was called? They were also responsible for putting the collapsable code regions into the latest version of Visual Studio.
Gosling likes idea of open source Java
I can see Java-like popup ads telling me I've "won the jackpot", except they'll BE in jackpot now?
Now, put this support straight into emacs and I'll be happy.
Isn't that what IntelliJ does already? I use it as my main IDE, and it has an amazing understanding of Java -- it allows you to refactor just about anything.
When working in it, you feel like you're not just editing Java -- you're editing the fully integrated structure of your software.
Does this mean our code will look like the "net" in hackers ?
And do we get those cool headsets too ?
Hey this is my first post. I have angry half-baked opinions tho. I find that commenting for a retarded 6 year old makes code unreadable. Have you ever tried to find anything in the apache tomcat sourcecode using only notepad? Why is there a comment on "getInfo()" that says "Returns the info."??? Some classes I was trying to understand I just went through and deleted every comment so I could read the damn thing. Turns out the class was only like 12 lines of code. It was like shaving a cat.
Analyze this!
A Conversation with James Gosling, Part I
by Bill Venners
Jun 9, 2003
Summary
James Gosling talks with Bill Venners about his current research project, code-named Jackpot, which builds annotated parse trees for programs and can help you analyze, visualize, and refactor your program.
For the past several years, Java's creator James Gosling has been working at Sun Labs, researching ways to analyze and manipulate programs represented as annotated parse trees, a project called Jackpot. Compilers have long built parse trees when they translate source code into binary. But traditionally, programmers have worked with source code primarily by manipulating text with editors. The goal of the Jackpot project is to investigate the value of treating the parse tree as the program at development time, not just at compile time.
In this interview, which will be published in multiple installments, James Gosling talks about many aspects of programming. In this first installment, Gosling describes the ways in which Jackpot can help programmers analyze, visualize, and refactor their programs.
Treating Programs as Algebraic Structures
Bill Venners: What's the state of Jackpot, your current research project?
James Gosling: Jackpot has been really cool lately. It's what I'm spending most of my time on, and it's been a lot of fun. I was really hoping to have something I could hand out at JavaOne this year, but I've been finding too many entertaining things to do.
It's a very different world when a program is an algebraic structure rather than a bag of characters, when you can actually do algebra on programs rather than just swizzling characters around. A lot of things become possible.
Bill Venners: Like what?
James Gosling: If you look at any of the refactoring books, most of those refactoring actions become much more straightforward, in ways that are fairly deep.
Moving a method isn't just cutting and pasting text. It's a lot more than renaming the parameters and swizzling them around, because you really want to be able to do things like construct forwarding methods. When you construct forwarding methods, they're different from the original methods.
You can't just replace all uses of the forwarding method by uses of the moved method, because they actually behave slightly differently. The difference is usually around what happens when the pivot parameter is null. That can lead you into a deep morass of essentially theorem proving about properties of the code fragments that you're moving, to understand how they behave with respect to null. And you can treat all kinds of code manipulation that way.
So Jackpot has a baby theorem prover, or algebraic simplifier, that knows an awful lot about data flow and the implications of values. And it really does treat your program as a piece of algebra to be simplified and transformed. It can do an awful lot of interesting analysis that pays off when you want to make fairly significant pervasive changes to very large programs. That analysis pays off, for example, when you want to replace one API with another API that is almost the same. Often "almost the same" is actually harder than "radically different." I spent most of the last four months working on this baby theorem prover, and that's been a lot of fun.
Creating Visual Representations of Programs
Bill Venners: I read that Jackpot can create interesting graphical representations of a program. What is that about?
James Gosling: Jackpot can take this underlying algebraic structureâ" it's really the annotated parse treeâ"and generate a visual representation from that. Our internal notion of the truth is not text. But once it's not text, all of a sudden you can display it in really interesting ways.
We've got an underlying rule engine that's able to do structural pattern matching very efficiently. We can go from the structural patterns it sees in your code to visual representations. So you can write what is kind o
Bush is on fire and its not good for my lungs.
As a Slashdot thread on a programming language progresses, the probability of someone claiming that "Lisp already does that" approaches unity.
The bitter lessons of a veteran coder: http://bitterprogrammer.blogspot.com
yes, java emacs. but gosling emacs real emacs. hell, i'm sure gosling emacs efuns AND gosling emacs efuns. i mean, this is gosling- at least NeWS was a good idea. :)
Working toward a usable PDA environment in the spirit of Newton OS: Dynapad
...because he raves on about simplicity yet took something beautiful -- Smalltalk -- and turned it into a steaming pile of complex, manager-friendly, dog-shit; a.k.a. Java. Oh, and -- WOW -- he's just now getting around to figuring out that a farking dynamic code model and not idiotic text files, is the way development should be done. Too bad that was in Smalltalk too! Our industry is going to implode and it's all our fault. When we accept bullshit artists like Gosling we deserve what we get. Oh, flamebait for the day: Emacs is a piece of shit too. Simplicity my ass.
Of course all this is easier in functional languages, because you don't have to worry about state, identical trees will always evaluate to the same value. Not so in Java, if any of the nodes refer to global data.
I wonder how often Gosling talks with Guy Steele, who was pivotal in the development of both Scheme and Java. I'd love to see what they'd come up with if they put their brains together.
OK, I read the article. What the hell are they talking about?
I'm an American. I love this country and the freedoms that we used to have.
Man, this has been done 30 freaking years ago already. Lisp (yeah, remember the parentheses?) has had this from day 1 essentially. walk the Wiki on this.
Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
I guess programming languages really are slowly merging. Java isn't getting macros now, but I suspect in another 5 or 10 years it'll be something else Java will do. =)
;)
Too bad it's Java - that means it would only take about 6 months to integrate it into any other language.
Yes, yes, I had to deal with all the "Lisp did it first" comments when Eidola was on Slashdot.
While it's true that the program is the parse tree in Lisp, that's not a very strong statement. Lisp's elegance comes from the fact that there are so few constructs in the language, and basically everything is a list -- even your programs. But they're basically just lists, that's all. So you have this wonderful flexibility, but the parse tree doesn't actually tell you very much about the program; you have to "parse the parse tree" to recognize higher-level constructs.
Now languages with lots of language-level constructs -- like strong static types, objects, access modifiers, etc. -- tell you a whole lot about high-level structure with their parse trees. (And, for those following along at home, Lisp is not such a language -- not that that's a bad thing, but it isn't. Lisp builds these high-level constructs out of a very few language-level atoms.) To my knowledge, applying the "language is the parse tree" principle to non-functional languages is still largely the domain of research projects like Jackpot, Eidola, and Intentional Programming, and visual languages.
Moral: Lisp is very, very, very cool, but it has not already done everything every other language is doing. So yes, it may sound familiar from you Lisp book, but it's not the same.
What's an environment that does the same thing, but for C? I can see that macros could foul up the works unless the system is extensible.
"I apologize for this long comment. I didn't have the time to make it any shorter.
Microsoft's answer ... Crackpot
No that was to easy. Mod me down dammit!
if people like Gosling could show Jackpot
and its benefits in a BUSINESS CONTEXT.
- Code gets cleaner, easier to maintain & debug.
- Multi-thread scaling areas get easier to spot.
- Profiling tools speed up based on the algebra.
- IT staff in mergers can finally merge apps.
Sure the technology is "cool" and "entertaining"
but these days Sun needs a profit.
Cheers, Joel
Anyone remember seeing the programming language called Whitespace. It uses a similar methodology where indentation and heirarchy are the key to the language. :)
"Do not be swept up in the momentum of mediocrity." - anon
When you googled for something *java* it was anoying enough to deal with stupid $tarbuck$
links, with 'Jackpot' an unlucky click and it might take 20 min to undo the popdowns, offers for the *best internet casino*... and oh my gawd, add to the wrong mail list!
(I was going to add an example link but I wouldn't do that to my worst enemy)
When writing LISP you're pretty much expressing a parse tree as a program, and yes, LISP does have some advantages when it comes to expressing certain solutions in an elegant manner.
Such a language, much like LISP, might be quite useful with respect to genetic programming.
In addition, a parse tree language which has lots of internal understanding of data flow might make for a good intermediate step in a compiler or perhaps become a better LISP.
It's good to see that Gosling isn't resting on his Java laurels but applying what he's learned in new areas of research.
-- Good judgement comes with experience. -- Experience comes with bad judgement.
Better repost that with `<`/`>` instead of `<` / `>`, you know, so they don't get eaten by the Slashcode, and we can figure out what the fuck that was supposed to mean.
Alex Stepanov famously described Java as "a money-oriented programming language". I guess that makes the name "Jackpot" an appropriate name. I suppose the next projects will be "Jingle" and "Jyp".
Anyone else get the feeling that Mr. Gosling's been Focused?
Has Gosling not ever looked at Smalltalk or Lisp? Heck, even if he's got Java tunnel vision, he wouldn't need to look further than Eclipse or IntelliJ.
Talk Small and Carry a Big Class Library
It's interesting how industry and academic research in systems and languages seem to have been racing neck and neck for the past decade. Visual programming languages have been around for a long time now, all which operate on "parse-trees" (which is largely a misnomer, since there's really no parsing going on). Keep in mind that by "visual," academics don't really mean to emphasize the visual. They mean to emphasize the fact that such computational formalisms allow programmers to operate on higher-level semantics than single characters, while completely avoiding syntactic errors (and often most type errors).
Of course, the difference is that academics build these programming systems because they offer the potential for easier learning and better domain-specific reasoning--and Gosling developed Jackpot because "...[it's] kind of goofy, but entertaining." Both approaches are essential for taking the programming systems community beyond it's archaic language-centric viewpoint. IMHO, Gosling won the programming language race with Java--who will the programming systems race?
Hmm... most of what he talks about has been available in proper languages for decades! I'll even try, as a public service, not to mention LISP :]
:)
Smalltalk has this:
(3/5) class methodDictionary at: #+
which will give you the + method for the Fraction class. From that object (the CompiledMethod) you can get the original source code (if it's available), or a parse tree. The parse tree will give you indices into the original source, in case you should need to do a GUI for your IDE
Say you're writing a debugger (which you can actually do, unlike in Java, where the debugger needs to run externally).. the MethodContext knowns at what opcode execution stopped, the parse tree knows which part of the source that represents. This means you can step operator by operator through an exression... no "line numbers".
You can *fake* some of these things in java, but it's not pretty - something like IntelliJ has to use its own special compiler and huge amounts of support code, and it's just plain impossible in Java for a system to debug itself.
Go play: free-as-in-beer-for-personal-use and nice / free, cute, fluffy and sluggish
</preach>
http://www.internalmemos.com/memos/memodetails.php ?memo_id=1321
Time to move on guys.
For me as along time programmer this feels like moving from C to C++. You can discuss your program on a whole other abstraction level.
GREAT.
Things are getting very interesting in the field of improving the coding process. I still remember Sniff C++ started by Eric Gamma in the early 90-ties. This was the first product to visualize/navigate over large C++ projects that blew me away. One can certainly see this approach in Eclipse - one of the latest projects of Eric Gamma.
A few very smart IDEs appeared - CodeGuide, Eclipse, IDEA.
Eric Gamma was working in an IT research lab in the UBS in Zurich in Switzerland before he became really famouns with his GoF book.
Lars
Not a great deal there yet, but if you're interested in Jackpot then the Jackpot home page would be worth bookmarking for future reference. Their early work on source code metrics is interesting and the published papers listed are a good starting point for more detailed information than can be delivered in an interview.
Sailing over the event horizon
Recent versions of Python have some MOP functionality in addition to reflection. (I can't remember if CLOS does reflection or not). It has metaclasses, and, IIRC, there are some hooks into dispatch outside of the metaclass stuff.
I happen to like the syntax of Lisp, and it's a lot faster than Python, but Python definitely wins in the library department.
I think the only example I've personally seen of MOP in use is UncommonSQL (an object/relational layer done by cleaning extending the class declaration syntax to cover the SQL information), which I like, but haven't used much.
Besides Lisp and Eclipse and IntelliJ, this sort of syntax-tree-oriented manipulation has been going on in optimization and programming language research for the last 20 years. (And Eclipse does a fine job -- all that chit-chat about encapsulating public instance variables is just a choice on the refactoring menu, and it's free. I've got no idea why Gosling thinks this is new and interesting.)
For example, people (including me) at Rice University worked on a source-to-source Fortran vectorizer that manipulated ASTs. Derivatives of that AST reappeared in the Dana/Ardent/Stardent compilers for C and Fortran. The Fortran AST was also used in an AST-based editor, a Fortran interpreter/debugger, a pretty printer, an ugly (fixed-format card image) printer, and dependence-displaying Fortran browsers (dependence here refers to loop iteration dependences that hinder parallelization).
One thing that became clear while working on AST-based editors was that people didn't want the tree structure continuously in their face. For example, at the expression level, Fortran programmers (as opposed to, say, Lisp programmers) found tree-based editing to be intolerable. The tree structure can be handy for browsing/skimming code; uninteresting blocks of code could be elided. But, people did not want to be prevented from making changes that were "only" syntactic.
Keep in mind, this is just the Rice-centric view, other people were doing things like program slicing (what code depends on the value of this variable). I'd love to see some of this stuff nicely integrated into an IDE -- that nice integration is the hard part, the theory is generally done and old.
I used to be a server-side Java bigot, but now I am older and wiser.
A lawyer & digital forensics examiner. Also an expert on open source software (OSS).
Gosling spoke:
One piece of analysis, therefore, is to find all the public instance variables. But we can find them and also make them private, add all the setters and getters, and account for what it means to actually access the variables via setters and getters.
As I've said before, Gosling appears to have oblivious to most of the research that had gone on in the field of object-oriented languages.
Java should been designed from the start to enforce getter/setter access to instance variables. This feature has long been recognized to be a desirable feature in an object-oriented language. I think Self, Dylan, and other object-oriented languages got this feature right.
i know what you mean. shaved pussy is so much more sensual. Who wants to eat furburger?
Do you even lift?
These aren't the 'roids you're looking for.
-
System and method for documenting and displaying computer program code
Apple
-
Method in a structure editor
IBM
-
Token-based computer program editor with program comment management
Sun
I'm sure there are other patents that could be applied to this as well. Someone mentioned that MS has this sort of functionality in Visual Studio, I sure hope they licensed everything properly.that's also what CmdrTaco said when he fisted Hemos and pulled out a big lump of shit. I won't go into the details of what happened next, but Kathleen fent reported that his toothbrush needed replacing.
Do you even lift?
These aren't the 'roids you're looking for.
Gosling Emacs, NeWS and SC should also be mentioned. Not all well known now, but all things I've used and appreciated.
And there are the obvious advantages that might be gained by representing programs as XML trees (internally at least, programmers don't need to see it).
I think I'll write an SMTP server in Jackpot and advertise it as such. Spambots will assume it's a honeypot, and my users will thank me.
Or I could just deny incoming connections from everyone that isn't large enough to file suit like AOL is doing. That way, I wouldn't have to learn yet another language or edit exim's source to say it's Jackpot.
You can't judge a book by the way it wears its hair.
Most of this stuff isn't new. The first general refactoring tool I ever saw was the RefactoringBrowser built by John Brant and Don Roberts at the University of Illinois at Urbana-Champaign. It uses Smalltalk parse trees to analyze code, perform refactorings, lint checks and code rewrites. It's free and has been incorporated into VisualWorks Smalltalk, Dolphin Smalltalk and Squeak, and is available as an add-on for VisualAge Smalltalk. To see the kinds of refactorings supported, check out: http://st-www.cs.uiuc.edu/~brant/RefactoringBrowse r/Refactorings.html
B rowse r/Lint.html
e r/Rewrite.html
n gBrowser.html and look at the dates. People use this free tool set every day.
To see the lint checks available, look at:
http://st-www.cs.uiuc.edu/~brant/Refactoring
And to see the parse tree based rewrite tool, go to: http://st-www.cs.uiuc.edu/~brant/RefactoringBrows
To see how long this has been available and something of it's evolution, check out the HyperNews page at http://st-www.cs.uiuc.edu/HyperNews/get/Refactori
Global code tranforms across classes and all that jazz.
- Horrible amounts of code
- 'Multi-platform code' that isn't always. .
. - Extremely slow execution
- Slow GUI performance...(someone please mention Eclipse as an anti-argument... then refer to #2).
- Nothing new other than forced OOP.
So what has Java brought us? You can write multi-platform C/C++ code, so what does Java honestly offer that nothing else does? Maybe possibly misinterpreted code because of various JVM versions? That's nice.INTERLISP's internal representation was the LISP s-expression. Programs lived in huge saved binary workspaces rather than text files, at least while being developed. This had pluses and minuses, especially on the underpowered machines of the period.
There were a number of transformations one could perform on code in this form, and they were guaranteed not to change the semantics of the program. You could designate a subexpression, and have the system extract it and turn it into a separate function, replacing the original code with a call to the new function. Just what you need when working on code with some overly large function. That's tough to do on a text file.
Doing this right depends on the system having a clear understanding of the language semantics. Java is one of the few remaining languages for which there's any hope of this working right.
Welcome. You'll fit straight in, no need to apologize.
Great, now we've lost the grandfather of Java to utter senility too.
Seriously, whenever someone tries to take things to a more "meta" level, it becomes a confusing mess that has nothing to do with real world problems. It's like when a physicist begins to wax religious. I'm sorry, but insisting on the existence of God doesn't solve any more problems than it creates in the physics world. Same applies to software.
You mean like C#?
;-)
Wahey!
And what has Eclipse got to do with servets? There's more to Java than GUI programs. Care to make any more meaningful sounding comments?
OK, obvious troll,but:
1. I write logic in less Java code than I would in C++/Delphi/etc.
2. Everyone I know writing server-side Java develops on a Windows platform (for the pretty IDEs, the integration into the office network, the availability of commercial productivity enhancing software) and then deploys onto Unix. Or Linux. Or occasionally even Windows. Sure, true multi-platform code is hard to write and doesn't happen very often, but most Java code is very portable and that capability is used with glee.
3. You're four years too late with that one. If it was extremely slow execution then it wouldn't have taken over as the prime non-mainframe server side language in corporations. Sure, it might (sometimes) be slower than compiled C++ - but so rarely does that actually matter.. Hint: Programmers cost more than extra CPU power; writing value creation code faster reduces costs far more than the overhead of a big box to run it on.
4. Agreed. Which is why most people don't use Java for the UI. Most UIs are written in VB or Delphi, or web-based (in Flash, or HTML/Javascript).
5. Nothing new? Maybe not. Easy language to work with, be productive in, get relatively error free code live and making/saving money for you with though.
Yes, you can write multi-platform C/C++ code - but everyone I know (including the C++ programmers) would rather do it in Java.
JVM version issues have never existed btw - not least because most commercial development houses test properly, deploy into a stable and maintainable environment.
Now, does this make Java ideal for everything? Not even close. Does Java offer anything that nothing else does? Possibly not. Is Java the language of choice for a lot of people? Yes. It must be doing something right then - try looking at the positive aspects of the language for once.
~Cederic
Gosling created one of the most popular languages out there. Java 1.0 (and 1.1) was no where near as good as Java 1.2. But I'm still absolutely amazed at how good a job he (and, I guess others at Sun) did on the first Java release. The language syntax is clean and the core class libraries are elegant and very functional.
From what I read, Gosling doesn't have much to do with Java nowadays, other than an annual token appearance at JavaOne
I guess he's moved onto other things, like Jackpot.
Now. Is it just me, or is building refactoring tools a bit of a come down?
I mean, there are other tools out there that already do a reasonable job (e.g. InteliJ and Eclipse).
This is like Peter Gabriel releasing 'Up' after 'So'. What a letdown. Or are my expectations for this guy just set too high?
Very interesting read. Two comments:
1) SCID seems to be a similar thing.
2) From the interview: For instance, if you've got a static method that takes an object as a parameter, and it modifies that object, then somebody probably just slapped that method in there because it was easy.
I don't think that's really true. Classes with static methods seem to be very convenient to me. Much like the decorator pattern, where code (here in the static method) only deals with modifying data objects given to it. That code doesn't need any kind of memory to store some kind of state, so it can be (should be) static.
Obviously, it can happen that a developer puts a method to some particular place where it doesn't fit because he's lazy.
Anyway, it'd be great to have something like Jackpot as a basis to write your own analysis tools.
Emacs? *horror*. Bill Joy created the best text editor of mankind:vi not even today no one have matched the brilliance of this creation.
> So, he says, complexity is hard. Well, that's a
> truly deep insight.
Actually a Perl programmer would say just the opposite. Complexity is ultimately *simpler* because it allows you to do so much more.
Look at natural language. It's enormously more complex than computer languages. It *is* possible to write a simplied logical language (see http://www.loglan.org/) but it's never gotten much momentum because they're too cumbersome. You spend more time thinking about how to think instead of just doing it and fixing up any misunderstandings afterwards.
The real world is also more complex than any computer language, but we're able to use the same imperical approach to deal with it's complexity.
Ambiguity and complexity are not problems. Our brains specialize in dealing with both. Our problem is the precision and inflexibility.
If you design your programs so that they are fault-tolerant and flexible, it doesn't matter how complex you system is. It will still be managable.
Unlike Godwin's Law, though, the probability that the claimant is correct also approaches 1.
To a Lisp hacker, XML is S-expressions in drag.
LOOPS had:
A single-inheritance object system with GUI support (class, method, and object browsers).
Editing with structure editors that manipulated the parse tree directly. The structure editor was also used as the inspector in the debugger.
refactoring support in the browsers (select a method and move it to another class, etc).
automated global refactoring based on code analysis - this being 1987, it had a pseudo-natural language interface (EDIT ALL METHODS CALLING FOO AND REFERENCING *BAR*...).
LOOPS is one of the primary predecessors of CLOS (the other being Flavors).
Parse-tree-based editing has been around for awhile - Google for "syntax directed editing". Paradoxically, it works much better in Lisp than in other, more syntax-heavy domains; when your editor insists that everything be syntactically and semantically well-formed all the time, it's best that there be very few, very general syntax rules. This is why it also works in Smalltalk.
To a Lisp hacker, XML is S-expressions in drag.
Gosling has been talking about this for at least two years. I'd really like to see it actually happen, because it's got tremendous potential.
His talk about complexity is a bit facetious; if you really wanted a simple programming language you'd do it all with S and K (trivial functional operators). The trick is not to minimize complexity but to achieve exactly the correct level of complexity.
Object orientation is one way of dealing with complexity: you group like functionality together into boxes with limited access between them. That controls complexity: the public interface to the box is simpler than the private interface.
However, designing objects to maximize cohesion while minimizing coupling (that is, getting everything that should be together together, and making everything that shouldn't be together apart) is tricky. You make commitments early in the process, and it can be hard to fix later.
Jackpot (if the damn thing is ever released) will make it a lot easier to analyze the coherence and coupling and redesign your classes for you. I've been contemplating such a thing for years, but the parse tree of Java is very hard to deal with (especially if you want to preserve comments) and I'd rather take advantage of his code to do it.
Yes, of course that would be easier in Lisp. Lisp programs are simpler, structurally. For many programmers they are too simple. The uniformity doesn't grab the eye and make it obvious what pieces of code belong with which other pieces. Various dialects deal with this in a variety of ways, but most new programmers latch on to Java because it seems to hit the right level of granularity for them.
Exactly why that should be is a subject of religious debate which would be utterly tiresome here. So let me leave it that many people _do_ program in Java, and as they aren't likely to switch any time soon it will be very pleasant if the right tools come along to make it easier. Jackpot will,I hope, make such tools available, One Of These Days.
4. Agreed. Which is why most people don't use Java for the UI. Most UIs are written in VB or Delphi, or web-based (in Flash, or HTML/Javascript).
I encourage you to take a look at IntelliJ IDEA. It blows the lid off the lie of 'show GUIs'. Other than it's start-up time (during which it's parsing your files, building caches, and other time-consuming tasks), it's quite fast. The whole thing is written in Java.
- Spryguy
There are three kinds of people in this world: those that can count and those that can't
Yes, and do you realize the significance of Gosling Emacs? It was its proprietary nature. Gosling Emacs was what finally got GNU Emacs off the ground as a successful open source Emacs implementation for UNIX systems.
Gosling has been hostile to open source from day one. He created NeWS and tried to kill off X11, and he was probably partially behind keeping Java proprietary.
- 1. You write less logic in code with Java if the class is written for you. It's exactly the same for every other language. The only time Java beats out these other languages is when it uses the GC... as you obviously don't need to free it yourself.
- You contradict yourself in the last sentence. Whenever I'm forced to write Java code, I do it on the system it will run on. Otherwise you never know what the results may be because of horrible JVM's.
- It took over because of people like you that are in love with the language for no reason other than a GC. It's slow and poorly managed. I'm surprised people don't call it a script yet (as it is not native code and is running against an interepretter...you know, the definition of a script).
- Oh, there goes number 2
:(. - Relatively error free code? When the f...ing JVM can have its own interpretation on any given box then you do not have error free code.
Everyone you know, eh? I guess you don't know anyone working somewhere that requires versioning, speed, or otherwise reliability? The version of JVM that is used at work (off-site actually) crashes every now and then (on a Unix AND Sun box) and the documentation seems more like a blog because of the code bases (to get into #1). You again contradict yourself with number 2. The sole purpose I hate JVM's are because they have to be written separately (because obviously they are written for operating systems to get the most speed, which I do not question). This really brings to life the idea of questioning Java as a language amongst C/C++, rather than PHP. In otherwords, compiled or scripted. Honestly I think it's closer to C/C++ than Java, but the fact remains that there is a program out there interpretting what to do and that HURTS speed. The only reason I'd suggest using Java is because of the GC, which is even slow, combined with the chance of multi-platform code. To get down to it, the GC is the only piece of Java that might actually help it 100% of the time because it should create/eliminate the memory efficiently, which C/C++ cannot do for you. Other than that, I would never use Java for reliability because come the next (next is a generalized term here, not in direct reference to the specific NEXT one) JVM it might kill everything.'closer to C/C++ than Java' should be 'closer to C/C++ than PHP'
Of course, I couldn't resist joining in the fun. This is a picture of me opening JavaOne'98 about to pie one of the stage hands wearing a Bill Gates mask.
It just proves that on a top of Sun management, their major beleif is in hate. They hate enimies: the other Unix companies, Microsoft, now Linux.
I don't love Microsoft either, but I would consider myself as a psyco if I would dream of hitting the face of Bill Gates with a cake.
Now, why are we listening to him? What kind of smart ideas are in his proposals? Generic programming with self-reflections? It's done for decades in Lisp and MOP. Syntax-free programming language? It's alreadydone in FlatCurry (Curry is LP ancestor of FP language Haskell).
What he is done? Besides Java, everything else he's invented is dead. Java is designed conceptually so badly that it survives only due to a huge money investment from Sun. All his dreams about Java on the thin-client side are dead: web-designers prefer Flash rather than Java Applets. SWING is dead. The only place where Java is still demanded (by whom? by non-programming hype-addicted managers?) is the server room with Solaris servers (no wonder, huh?).
By the way, he was one of who killed Tcl (the best scripting language of that time (1995) b/c it was extremely extensible, i.e. OOP, FP, tcl2c, extensions), by kicking out the project of John Osterought, the Tcl inventor who worked for Sun that time.
Now all he is doing is reading old (and thus not very well known among the public) LISP/MOP books as well as academic FlatCurry papers (also not very well known) and stealing ideas for his Jackpod project.
Less is more !
When you construct forwarding methods, they're different from the original methods. You can't just replace all uses of the forwarding method by uses of the moved method, because they actually behave slightly differently.
That sounds like a language design problem to me. The solution to that should be to fix the language, not to construct elaborate theorem provers and visual representations of the source code. Building tools to deal with a messy language will just mean that the language and software written in it will evolve to be so messy that nobody can deal with it by hand anymore at all.
But, hey, Gosling did all of this before: NeWS used a bad choice for a display server programming language, and when all was said and done, almost everybody just used the toolkit wrappers; the only effect of Postscript on the server was that the thing ran slow and was flaky.
un-fsking-believable. Someone posts opinion of java being then emacs and he gets modded into flamebait ? /. editors : please revoke this flamebait moderator of his moderation rights. IU have never used emacs NOR vi, but how can u possibly call something flamebait if one compares two projects of teh same author !
When will I end this grieving ? When will my future begin ?
"People don't realize that vi was created for a world that doesn't exist anymore." -Bill Joy
For one accusing others of hate, you sure know how to pour on the venom. Do you have no sense of humor? How does engaging in slapstick comedy against someone prove you hate him? You really should watch some Monty Python or Three Stooges. It'll help you lighten up a bit. Maybe Sun does have irrational hatred for outside things, but this isn't an indicator of it.
As for Java, I agree it's not that exciting, but it was intended to implement well established ideas, not be revolutionary. No, Gosling isn't doing anything entirely new here, but that doesn't make it stealing or useless. Give the guy a break.
Java should been designed from the start to enforce getter/setter access to instance variables.
Even for thin wrapper classes such as java.lang.Integer and javax.vecmath.Vector3d? It seems like in such a case, the syntactic vinegar of not allowing public fields would not provide any actual benefit.
Will I retire or break 10K?
Is anyone creating an Open Source Java?
[in clams-got-legs-voice]
Bill Joy likes emacs bill joy likes emacs... huh? you can dis vi and not like emacs... the hell you say!