News for hackers. Stuff that matters.
Re:C++ in Coders at Work by loup-vaillant on Friday October 16, 2009 @12:38PM (#885686)
I totally agree. C++ main strength lies in its "portable assembler" nature. However, C++ also is [quite a behemoth][1], while Lisp, Python and Haskell aren't so.

[1]: http://yosefk.com/c++fqa/

The answer then is obvious : we should change the hardware, so it is not C/C++ optimized, but Lisp/Python/Haskell optimized. Then, these languages are easier and more practical.

Re:C++ in Coders at Work by mahmud on Friday October 16, 2009 @01:10PM (#885743)
Lisp, Python and Haskell should never ever be separated by a mere slash; they're totally different beasts.
Re:C++ in Coders at Work by loup-vaillant on Saturday October 17, 2009 @05:15PM (#887439)
Sorry, of course they are. I miss-phrased my sentence. I should have said "Lisp optimized, or Python optimized or Haskell optimized", or even "lovely language(s) optimized".

But I didn't start this: "Lovely languages like lisp, python, haskell" (sic).

Re:C++ in Coders at Work by jimbokun on Friday October 16, 2009 @01:17PM (#885758)
"we should change the hardware, so it is not C/C++ optimized, but Lisp/Python/Haskell optimized."

http://en.wikipedia.org/wiki/Lisp_machine

Re:C++ in Coders at Work by russell on Friday October 16, 2009 @05:43PM (#886242)
In general, hardware optimized for high-level languages have been a failure, usually the extra baggage for handling things as machine-level interpreter slow things down nearly as much as a software interpreter. Nothing has been a real commercial success and it isnt for want of trying. Off the top of my head I can think of the Burroughs B5500 which had hardware support for typed data, the Lisp Machine, and the Intel 432. Sun had a Java machine specification, but I dont think anyone ever bit.
Re:C++ in Coders at Work by Tuna-Fish on Friday October 16, 2009 @09:17PM (#886482)
There's Jazelle for ARM, it's essentially a instruction overlay that makes the cpu execute all simple and common java bytecodes directly, and call a kernel function for all the hard ones.

However, even that is dying -- it is being replaced by the thumbEE, which is a more generic instruction set designed for efficient code generation from intermediate dynamic code.

Re:C++ in Coders at Work by agazso on Sunday October 18, 2009 @05:27AM (#888198)
There is Azul Systems, that produces massive servers for Java applications.

http://en.wikipedia.org/wiki/Azul_Systems

I don't know how successful they are economically though.

Re:C++ in Coders at Work by jacquesm on Friday October 16, 2009 @08:40PM (#886438)
There is forth on hardware, and a long tradition of that. It's still alive and kicking.
Re:C++ in Coders at Work by LogicHoleFlaw on Friday October 16, 2009 @07:24PM (#886363)
IBM has plug-in hardware JVMs for its mainframe big iron. They are ungodly expensive.
Re:C++ in Coders at Work by jacquesm on Friday October 16, 2009 @08:59PM (#886460)
I can't find anything about that, it's quite interesting do you have a link ?

edit: found it:

http://news.zdnet.com/2100-9584_22-135319.html

Re:C++ in Coders at Work by ShardPhoenix on Saturday October 17, 2009 @03:53AM (#886758)
According to Wikipedia, "zAAPs are not specifically optimized to run Java faster or better". Apparently they're just normal IBM mainframe processors crippled to only run Java and XML.
Re:C++ in Coders at Work by coliveira on Friday October 16, 2009 @01:13PM (#885753)
No, C is a portable assembler. C++ was created to add "high level" OO features to C. But the success of the effort is highly controversial, because there are differences between C and the OO model that are too difficult to overcome.

I think the strategy of objective-C is much cleaner, since they better separate the concerns of "writing fast code" and "writing high level OO abstractions".

Re:C++ in Coders at Work by chancho on Friday October 16, 2009 @03:46PM (#886038)
How, on a site like HN that champions pragmatic entrepreneurialism, can you possibly claim that the success of C++, a language that has been deployed probably more than any other except C, is controversial? It's a matter of fact. C++ won the early OO race. Maybe Java and C# and whatever have since eclipsed it, but it was still a smashing success by all objective measures, and still is by some of those measures. Yeah it's ugly, but end users don't care.
Re:C++ in Coders at Work by loup-vaillant on Saturday October 17, 2009 @05:51PM (#887477)
He wasn't talking about the success (popularity) of C++ at all. He was talking about the success of the effort of adding "high level" OO features to C.

I think C++ totally failed at being high level. So, this "success" being highly controversial doesn't surprise me.

Re:C++ in Coders at Work by loup-vaillant on Saturday October 17, 2009 @05:44PM (#887472)
Two quotes from http://www.jwz.org/doc/java.html

C (the PDP-11 assembler that thinks it's a language)

C++ (the PDP-11 assembler that thinks it's an object system)

C isn't really a portable assembler. It was designed to be sufficiently efficient on a specific processor (the PDP11, a register based CPU), while providing basic abstractions (function, structures…).

C was an overwhelming success. And so were CPUs fast at running compiled C programs. As far as hardware optimization is concerned, the main characteristics of C are pointer arithmetic, manual memory management, and a relatively low ratio of function calls (in C programs). These are pretty big constraints. So, we ended up with C optimized CPUs. Now what if Unix has been implemented in Forth? All mainstream processors would have been stack based, and optimized for a very high ration of function calls.

C++, by extending C, also have this "portable assembler" nature. It also have a number of incredibly low-level mechanisms which can be used to build pretty high-level abstractions, but it's still an extension of C.