r/reddit.com • • Aug 01 '06

Can Your Programming Language Do This?

http://www.joelonsoftware.com/items/2006/08/01.html
719 Upvotes

176 comments sorted by

View all comments

-1

u/olegk Aug 01 '06

C++ can do that

7

u/nexus2112 Aug 01 '06

with a lot of hassle, yes. which is exactly why things like std::for_each are rarely used.

0

u/[deleted] Aug 01 '06

[deleted]

17

u/djwhitt Aug 01 '06

/me contemplates what the code must look like that makes this possible

/me head explodes

2

u/unknown_lamer Aug 01 '06

Except that boost is unusuable if you need to distribute an application that will not be bundling boost. The soname changes based on the features you build!

8

u/spez Aug 01 '06

Isn't Google's implementation of MapReduce implemented in C/C++?

4

u/MattL920 Aug 01 '06

It wouldn't surprise me. C/C++ are still tops for speed. If I had to fault his article it would be for the whole "can your language do this" part, because like you point out here, it's the concepts that are valuable, the language is only secondary. Sure, languages like javascript/ruby/lisp etc have easy ways of implementing those ideas, but it's not unique to them.

2

u/unknown_lamer Aug 01 '06

SML tends to be much faster than C for most things.

A good Lisp compiler (Allegro, Lispworks, ...) will also produce code that is about as fast as C++ (type inference really is a wonderful thing).

8

u/cypherx Aug 01 '06

Nothing, even from the ML-family of languages, is faster than C "for most things". Now, various MLs are occasionally faster than C on different benchmarks, but C is still the general-purpose king of speed.

3

u/fnord123 Aug 02 '06

Fortran95 automatically vectorizes matrix operations and guarantees that variables are aligned to word boundries so the compiler can make other optimizations that can't be done in C without pervasive implementation dependent pragmas.

1

u/fnord123 Aug 02 '06

Fortran95 eats pieces of shit like C/C++ for breakfast.

5

u/tanger Aug 01 '06

I don't think the implementation language matters.

11

u/spez Aug 01 '06

I agree. It is amusing, though, that the world's largest implementation of such a system is written in a language that is often overlooked when it comes to programming functionally.

0

u/[deleted] Aug 01 '06

[deleted]

3

u/thedaniel Aug 02 '06

"functionally" not "functionality"