• Post Reply Bookmark Topic Watch Topic
  • New Topic

To the authors: do languages really need to be that subtle?  RSS feed

 
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is more a rhetorical question than anything else...
... but if I can win a book out of it ...

ANYWAY:

Doesn't the fact that you can write a whole book on "Things you Never Knew" and "Surprising Gotcha's" on a language you *thought* you knew like the back of your hand ... suggest that there might be something *wrong* with that language?

Java's definitely an improvement over C++ in terms of complexity ... but is it
*really* that much better than C? Or Pascal? Or FORTRAN IV or VB, for that matter?

Just curious what your thoughts are...

PS:
Win or buy: I *definitely* want to read the book!
 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java is definately better cause it give u the power to do wateva u want and the GUI makes it easier to think through ur imagination wat can i say tis versitile
 
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,

This is a good question! There's definitely a tradeoff between language complexity and library complexity. There are languages -- Eiffel, for example -- that push all numerics into a library. This lets you omit the complexity of numerics from any discussion of the language itself -- of course, then you have to be careful while using the library.

Other languages simplify things by adding to the complexity of the implementation -- for example, the arbitrary-magnitude numbers several common languages now have, which avoid edge cases at the expense of slower and more complex numerics implementation.

I think Java could certainly be simplified further without losing any real power.
 
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kelly devon:
java is definately better cause it give u the power to do wateva u want and the GUI makes it easier to think through ur imagination wat can i say tis versitile


Assembler (or even raw binary machine code) gives me the power to do everything I want, too, so why should I choose Java instead? *mwhahahahahaha*
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by kelly devon:
java is definately better cause it give u the power to do wateva u want and the GUI makes it easier to think through ur imagination wat can i say tis versitile


Although Java is indeed versatile, it does have not only strict rules one needs to follow, but also many best practices one ought to follow to use it effectively. A surprising number of languages are like that. Attempting to ignore those best practices leads, generally, to shoddy, substandard implementations that don't effectively communicate their intent.
 
Author and "Sun God"
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul,

This is a really good question. As a practical matter, other platforms with the power of Java have more traps and pitfalls. We scraped the bottom of the barrel to come up with 95 puzzles. It is a testament to the quality of the Java platfom that we were able to fit all of the traps and pitfalls that we knew into one book. Imagine writing a book like this about C++.

That said, it feels like it should be possible to design a platform that is simpler but equally powerful. But it wouldn't be easy. Languages have many features. Each interacts with all the others, and all it takes is one unfortunate interaction to cause a problem. Language design is hard. To quote James Gosling, it's like playing whack-a-mole. You can eliminate one trap, but another one pops up as a result, and in a place where you least expect it.

Other complicating factors arise from the fact that platforms are created in "the real world." Java 1.0 was released in a hurry because a market window existed. If the designers had waited till it was perfect, it never would have taken off as it did. As a platform evolves, many people work on it, and it's difficult to coordinate all of their efforts. When all is said and done, I think the designers of the Java platform did a remarkable job producing a platform that's relatively free of traps and pitfalls.

I do think there is a general technique for keeping a platform free of traps and pitfalls: Keep it simple! But simple ain't easy. As C.A.R. Hoare put it in his 1980 Turing Award speech:


I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies.

The first method is far more difficult. It demands the same skill, devotion, insight, and even inspiration as the discovery of the simple physical laws which underlie the complex phenomena of nature. It also requires a willingness to accept objectives which are limited by physical, logical, and technological constraints, and to accept a compromise when conflicting objectives cannot be met. No committee will ever do this until it is too late.


Some day there may be mainstream platform that is as powerful as Java and less bug-prone, but it will take lots of hard work and a good bit of luck.

Regards,

Josh
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!