Linked by Thom Holwerda on Tue 12th Oct 2010 21:52 UTC
Java "Oracle and IBM today announced that the companies will collaborate to allow developers and customers to build and innovate based on existing Java investments and the OpenJDK reference implementation. Specifically, the companies will collaborate in the OpenJDK community to develop the leading open source Java environment."
Thread beginning with comment 444907
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[2]: Why all the fuss about Java?
by gilboa on Wed 13th Oct 2010 13:24 UTC in reply to "RE: Why all the fuss about Java?"
gilboa
Member since:
2005-07-06

Such arrogance and no knowledge to back it up.


I'd suggest you take a couple of basic C courses, as your comment was -way- of the mark.

Nothing stops from implementing objects in pure C. Come to think about it, more-or-less any language that support functions, complex storage [e.g. arrays] and callback functions, can implement objects.
Heck, I can even implement objects (including inheritance) in BASH or assembly!

Now, whether -you- consider that true object oriented language (as it requires some additional foot work to implement objects), is irrelevant.

... I'd think twice before calling someone arrogant.
(Keep in mind that I don't really agree with the OP)

- Gilboa

Edited 2010-10-13 13:26 UTC

Reply Parent Score: 6

drstorm Member since:
2009-04-24

Nothing stops me from implementing objects in pure C?

Well, of course I knew that, but what's your point?

OO paradigm is a super-set of procedural programming, thus it is obvious that the same functionality can be achieved in a procedural language.

In a broader sense, any currently used paradigm can be implemented in an assembler, but does that mean that we should use assemblers for everything?

The question is why would you bother to use C to emulate C++ (unless you have to for some reason, e.g. for backward compatibility or to work around compiler limitations)?

Now, whether -you- consider that true object oriented language (as it requires some additional foot work to implement objects), is irrelevant.

It's very relevant because it is not a matter of opinion. C is not object-oriented. Period.

Besides, that OO-C thing is just the bit that caught my eye. When someone claims that C is the way to go for web development, I naturally assume that they don't have a clue. Call it a prejudice, but I'm rarely wrong.

In the world where web apps are barely secure even though they are written in high level languages like Java, the last thing we need it to return to buffer overflows, dangling pointers, etc.

Edited 2010-10-13 14:25 UTC

Reply Parent Score: 3

rom508 Member since:
2007-04-20

Besides, that OO-C thing is just the bit that caught my eye. When someone claims that C is the way to go for web development, I naturally assume that they don't have a clue. Call it a prejudice, but I'm rarely wrong.

In the world where web apps are barely secure even though they are written in high level languages like Java, the last thing we need it to return to buffer overflows, dangling pointers, etc.


If you are constantly having problems with buffer overflows and dangling pointers, then maybe you should go back to college.

I've written huge amounts of C code - stacks, queues, linked lists, concurrent hash tables, multithreaded network servers that can handle 1000s of concurrent connections, using I/O multiplexing (poll, kqueue, epoll, etc). I've also written a fair amount of string/text parsing code, e.g. HTTP parser, and I didn't really have any major issues with buffer overflows or dangling pointers.

When someone says C is insecure, or results in buggy code, it is usually the case of an incompetent programmer who blames his tools.

If you think it's impossible to write reusable software in C, using object-oriented interfaces, then get a book by Eric S. Roberts "Programming Abstractions in C", you may learn a great deal from it.

Edited 2010-10-13 15:06 UTC

Reply Parent Score: 2

RshPL Member since:
2009-03-13


OO paradigm is a super-set of procedural programming, thus it is obvious that the same functionality can be achieved in a procedural language.

I would say that is rather a mindset of designing an application or a library.


In a broader sense, any currently used paradigm can be implemented in an assembler, but does that mean that we should use assemblers for everything?

Hmm .. not. See pure functional languages. ;)


The question is why would you bother to use C to emulate C++ (unless you have to for some reason, e.g. for backward compatibility or to work around compiler limitations)?

Actually this question is pretty valid. One can code in C++
in a way that is very clean avoiding all the shitty complicated syntax and also making use of more strict type checking and const correctness. C++ is in not even slower in C in a pure sense. If you do OOP in C and do parallelism it will the same speed as virtual methods in C++.
However, what I heard about C++ is that it adds so much to the syntax landscape that it encourages very shitty design.
I think it's the same argument as with Perl / Python.
Python encourages one clean syntax, while with Perl programs
can take a form of an ascii art. ;)


"Now, whether -you- consider that true object oriented language (as it requires some additional foot work to implement objects), is irrelevant.

It's very relevant because it is not a matter of opinion. C is not object-oriented. Period.
"
Well .. it's a strange situation then .. C is a language with no object-oriented design in mind but it allows for designing your programs with object-oriented design. ;)

Besides, that OO-C thing is just the bit that caught my eye. When someone claims that C is the way to go for web development, I naturally assume that they don't have a clue. Call it a prejudice, but I'm rarely wrong.

In the world where web apps are barely secure even though they are written in high level languages like Java, the last thing we need it to return to buffer overflows, dangling pointers, etc.

While C would not be perfect for Web Development one could image a library that could even do garbage collection and be
relatively easy to use. I think writing web apps in C could be a somewhat achievable given a good library.
With C++ however the possibilities for convenient Web Dev are endless .. all the language features you can utilize.

Reply Parent Score: 0

gilboa Member since:
2005-07-06

The question is why would you bother to use C to emulate C++ (unless you have to for some reason, e.g. for backward compatibility or to work around compiler limitations)?


Of the top of my head:
1. You only need a small subset of CPP OO capabilities (objects), but rather not get hit by the CPP compiler limitations. (E.g. strong types)
2. Memory allocation under CPP is abysmal, at best. (Even if you take the time to replace the new implementation with your own, you still cannot replace informative error codes...)
3. Class constructor (and destructor) are poorly designed (lack of informative error codes), forcing you to use C-like initialization functions.
4. I work in environments (such as kernels) that do no look kindly at linking against the CPP rt libraries, let alone using exceptions (!!!!!) as error handling mechanism...

In short, if you only require objects and limited inheritance, good C implementation is far superior compared to full fledged implementation CPP. (And don't get me started about STL!)

In the world where web apps are barely secure even though they are written in high level languages like Java, the last thing we need it to return to buffer overflows, dangling pointers, etc.


I fully agree. As I said, I didn't really agree with the OP.

- Gilboa

Reply Parent Score: 2