| Article: |
Technologies to Watch: A Look at Four That May Challenge Javas Development Dominance | |
| Subject: | Not the best Java code example | |
| Date: | 2005-10-29 08:37:52 | |
| From: | ttfkam | |
|
class Fib {
|
||
Showing messages 1 through 3 of 3.
-
Not the best Java code example
2005-11-21 07:06:57 JendaPerl [View]
-
Java as an "important standard"
2006-01-17 11:39:19 AdrienLamothe [View]
Mr. Tate states that "Java has been an outstanding development language for the industry because it's brought a remarkable unity and attention to important standards where practically none existed before."
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
-
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



min, max = find_supremes list
than to either return an array:
int []arr = find_supremes(list);
int min = arr[0];
int max = arr[1];
or pass the variables by reference?
Also suppose you need to switch the contents of two variables. Isn't
x, y = y, x
(or in the "oh-so-unreadable" Perl syntax
($x, $y) = ($y, $x);)easier to read than
{
guessWhatType tmp = x;
x = y;
y = tmp;
}
?