Re: Newbie question - Disadvantages of java

From: Joona I Palaste (palaste_at_cc.helsinki.fi)
Date: 10/22/03


Date: 22 Oct 2003 15:18:20 GMT

Gary Labowitz <glabowitz@comcast.net> scribbled the following:
> "Martin Wildam" <mwildam@may.co.at> wrote in message
> news:bn59uf$t1rgk$1@ID-114185.news.uni-berlin.de...
>> Hi folks,
>>
>> as I am about to switch to java, can somebody tell me the biggest
>> disadvantages of java so that I know where I will get the problems and
> where
>> the bottlenecks are?

> I can only point out the things that are the most difficult for most of my
> students:

> 1. Understanding the concept of passing by value. (And stop saying "I pass
> an object" until you really know what is happening.)
> 2. Understanding that only variables are passed from method to method.

Not "variables" - "values". For example:

public class Foo {
}
public class Bar {
  public Foo getFoo() {
    return new Foo();
  }
}
public class Baz {
  public void useFoo(Foo foo) {
  }
}

Now the code:
new Baz().useFoo(new Bar().getFoo());
passes a value of type "reference to a Foo" to the useFoo() method in
Baz. But this value is not stored in any variable.

> The simple points:

> 1. There are only nine kinds of variables. They all have exactly defined
> properties.

I.e. primitive types, references and array references?

-- 
/-- Joona Palaste (palaste@cc.helsinki.fi) ------------- Finland --------\
\-- http://www.helsinki.fi/~palaste --------------------- rules! --------/
"The trouble with the French is they don't have a word for entrepreneur."
   - George Bush


Relevant Pages

  • Re: Differences between C++ and Java
    ... or not, but I'm assuming there is no "Foo" such that for all "bar", "bar instanceof Foo" returns true in C++. ... function pointers are not compatible with void pointers). ... It fits the parallel with Java, since there are no Java references to methods. ... C++ you don't have to use objects through pointers, since references work just as polymorphically. ...
    (comp.lang.java.programmer)
  • Re: returning a pair of iterator.
    ... Java is not C++. ... If you don't trust someone with your ... public int getData() ... public class ValuableObject implements ReadableValuableObject {... ...
    (comp.lang.java.programmer)
  • Re: Java Instanz und Objekt frage ?
    ... >>>fully qualified name der Klasse.Wenn du jetzt diesen Namensraum nimmst ... > laut VM ist der FQN von Foo Foo und nicht .Foo. .Foo ist ein ungültiger ... einem gedankenexperiment die Sprache Java' vorzustellen, ... Nochmal: die Transformation geht so: ...
    (de.comp.lang.java)
  • Re: On Symbols
    ... Have any of the explanations in the thread (What is the difference between:foo and "foo" ?) helped you understand symbols? ... For example, a Lisp symbol can also be bound to a value, a property list, or a function. ... I do know what a string is, and the definition of "interned" is supplied. ... I don't know Java. ...
    (comp.lang.ruby)
  • Re: cast to sub-class or extending instance of super or a.n.other
    ... In java, the set of attributes is defined by the class, which is defined at compile-time; when you have an instance, it's runtime, by which point the class definitions are set in stone. ... public class ThingWithMinimumMessageNumber { ... private int minimumMessageNumber; ... public ThingWithMinimumMessageNumber(OriginalThing thing, int minimumMessageNumber) { ...
    (comp.lang.java.programmer)