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.
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.
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.