News for hackers. Stuff that matters.
Re:Only fast languages are interesting by omegaworks on Wednesday November 30, 2011 @05:56AM (#3294619)
Nice code is maintainable code. High-level languages exist for the sole purpose of making code "nice."

You pay enough attention to "is it fast" and you'll find yourself writing everything in assembler. There's a time and place for that, sure, but when you have a high level language that can theoretically optimize idiomatic code into something faster, it should opt to.

Re:Only fast languages are interesting by buff-a on Wednesday November 30, 2011 @06:45AM (#3294719)
You pay enough attention to "is it fast" and you'll find yourself writing everything in assembler

Not everything. Not even then. Just the good bits maybe. Sometimes none of it. It might make me prefer C# over Java for example, because C# can lay down structs linearly in memory so I can throw them to the graphics card directly. Or maybe I'd do all the hard work in C and SWIG it so I could use Ruby.

But what I certainly wouldn't do is attempt to write a physics simulation in python, "idiomatic" or not.

Re:Only fast languages are interesting by arethuza on Wednesday November 30, 2011 @07:07AM (#3294768)
"But what I certainly wouldn't do is attempt to write a physics simulation in python"

Depends on whether performance is a hard requirement or not - I've written engineering simulations of parts of power stations (including one nuclear plant) in Lisp and they weren't particularly fast but nobody bothered because they weren't used interactively.

Eventually I did write Lisp to generate C++ code for the same models when we did want better performance and it worked really well - but I only did that as an optional step when someone needed the extra performance.

Re:Only fast languages are interesting by rbanffy on Wednesday November 30, 2011 @09:05AM (#3295029)
> I certainly wouldn't do is attempt to write a physics simulation in python, "idiomatic" or not.

http://numpy.scipy.org/

Life can be good.

Re:Only fast languages are interesting by probably on Wednesday November 30, 2011 @12:51PM (#3295942)
But that's the thing - I would argue that NumPy code is not "idiomatic" Python which uses built-in operations/structures, like list comprehensions, tuples, and dictionaries. I had a similar experience during extensive NumPy coding where I thought, why am I not just writing this in Fortran.
Re:Only fast languages are interesting by rbanffy on Wednesday November 30, 2011 @08:55AM (#3295002)
> pay enough attention to "is it fast" and you'll find yourself writing everything in assembler

Or microcode. Or dedicated hardware.