Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help: Program not doing what it's supposed to
#6
(12-10-2009, 03:45 AM)MrD. Wrote: Ergh, that caught me out when I first used Java. It was my first time meeting a high-level language that didn't have an overloaded equality/inequality operator on a string class to do a string compare (and I still find it quite stupid, why would you ever want to compare the memory address of a string literal? It will never match anything else).

I would not consider Java as a high level language. It is more similar to C++ and other lower level languages than most people realise.
The only reason some people consider it high level is because it has automated garbage collection and memory management (ie. no pointers and whatnot like C++)

Most high level languages like php are String languages meaning they don't have variable types, instead they work on Strings. So that is why you can compare strings with == in high level (String languages) because they are using strings as the "primitives" of the language. Whereas Java which is a "high" low-level language.
Uses true primitive data types such as doubles(2^64) and ints(2^32). Thus the language must treat anything else as an object.

This seems annoying but it allows you to do more and be more creative. ie. low level languages.
Reply


Messages In This Thread
RE: Help: Program not doing what it's supposed to - by 1337 - 12-10-2009, 08:47 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)