|
Authored by: mcinsand on Friday, April 20 2012 @ 08:50 AM EDT |
The main motivation was for a 'write once, run anywhere' language, which was my
motivation for learning C back in the '80's (aaaah...ANSI C). However, the big
difference between the two is that C requires a bit of discipline when it comes
to variable and memory management. Java is a lot like BASIC, in that those
details are managed in overhead. So, it's easier for a new, non-programmer to
jump in and create something, but Java is really not so good for a project of
any complexity.
A tool analogy might be appropriate. With C, you use the right tool for each
step, keeping overhead down. With JAVA or BASIC, most operations don't involve
a medium Phillips screwdriver but just a different Swiss Army knife. All of
that adds to bloat, resource consumption, and prepensity to crash.
Anecdote: When I ported an optimization from FORTRAN to C in the '90's, the
literal translation, as I saw it, took solution times from around 8 hours to 15
minutes. Time dropped more with tweaks, but it takes a while to find the
deepest dimple on a 17-dimension golf ball.[ Reply to This | Parent | # ]
|
|
Authored by: Anonymous on Friday, April 20 2012 @ 10:00 AM EDT |
There wasn't really a licensing issue until Oracle bought Sun apparently with
the intention of branching out into patent trolling. It's a relatively recent
thing.[ Reply to This | Parent | # ]
|
|
Authored by: TheOldBear on Friday, April 20 2012 @ 10:24 AM EDT |
Java was intended to be an Object Oriented Language that could easily be
adopted by programers familiar with C [or Pascal]. The JVM + Java Libraries
provided a consistent, portable environment [like the UCSD P system].
The
result is that the language is small and deliberately not extensible, but
the
libraries are extensive.
The single rooted, single inheritance, nature of
the object tree forces
coupling of the library and programs. This was accepted
in other object
oriented languages like Smalltalk that also had a single root
for their object
tree.
By comparison, the contemporary versions of C++
allowed programers to
create their own language to express their problem domain
[operator
overloading, no common base class, mixin classes] but had a very
small
standard library. [The C++ Standard Library grew in
the aftermath of the
ANSI/ISO standardization effort - especially when
templates and a Standard
Template Library were added].
C++ still allows the programmer to use non
object oriented subsets of the
functionality, including programs that did not
use any standard library
function, class or template. [Use the C++ system as a
'Better C'] [ Reply to This | Parent | # ]
|
|
|
|
|