| Article: |
Technologies to Watch: A Look at Four That May Challenge Javas Development Dominance | |
| Subject: | Not the best Java code example | |
| Date: | 2005-11-21 07:06:57 | |
| From: | JendaPerl | |
|
Response to: Not the best Java code example
|
||
|
I think you are missing something. The multiple variable assignment is not that handy if you just need to assign two constants to two variables. You are right you could write it as two assignments and it would actually be more readable. The beauty of the multivar assignment comes when there are functions (or methods if you insist) involved. Suppose you need to return two integers from a function. Isn't it better to write
|
||
Showing messages 1 through 2 of 2.
-
Java as an "important standard"
2006-01-17 11:39:19 AdrienLamothe [View]
-
Not the best Java code example
2005-11-21 07:51:18 ikayak [View]
Good point on || assignments. The most common improvement for me is saving the use of a temp variable, such as your x, y = y, x



I'm not sure which standards he is referring to, but Java is nothing more than a de-facto standard, of sorts. When Sun approached ISO to approve Java as a certified international standard, they didn't get very far. The reason? ISO will not approve a programming language that is controlled by only one company. Sun can decide to change the Java specification anytime they want, for any reason. They can change the terms under which Java can be used. This is unacceptable for an international standard.
C++ is much maligned, but virtually all major
commercial software is developed in C++. Mr. Tate's
emphasis seems to be web development, a domain
where dynamic languages are more appropriate
and where Java use is widespread.
- Adrien Lamothe