
New trends in programming languages - xor0110
https://medium.com/julia-notes/new-trends-in-programming-languages-1876e879651d
======
eigenspace
This is a very nicely written article. I especially like the way the author
builds up by describing the evolution of dynamic and static languages and how
julia does a great job at solving the problems facing most static and dynamic
languages in scientific computing.

------
anonu
Please change the title to "New trends in programming languages and why Julia
is better"

------
pingyong
When you see this line

    
    
        auto values = new std::unordered_set<T>();
    

in their C++ benchmark code you already know it's gonna be a good article.

~~~
Asraelite
Sorry, C++ newbie, why is this significant?

~~~
pingyong
One because memory allocations can be pretty expensive performance wise, two
because you never want to manually allocate memory if you have the standard
library accessible to you (you want to use smart pointers instead), three
because the allocation is completely pointless here in the first place because
std::unordered_map allocates everything it needs internally, you can just
create the object on the stack, so you just introduce an additional
indirection and an additional allocation for no reason.

All together whoever wrote the code has no idea how to write C++ and was
probably just happy that the code didn't crash. (Also this essentially just
benchmarks the unordered_map implementation that happens to come with whatever
standard library they're using instead of anything intrinsic to the language.
How fast unordered_map does certain operations can vary wildly between
different implementations, and if you really needed a similar data structure
that delivers absolute maximum performance for your use case you would write
it yourself.)

Also these "language x is this fast" comparisons are generally useless anyway,
if you care about a 5x compute speedup or less you're going to use a native
language and fiddle with it until the compiler gives you the binary code you
want essentially (which in return means they're all equally fast if you do
things correctly), and if you don't care about a 5x speedup you can use
whatever language you want, they're all fast enough.

The only "language benchmarks" that are actually useful are ones that compare
different coding paradigms, for example using exceptions vs not using
exceptions, or inheritance vs function pointers, etc. - but these kinds of
things require a fairly good understanding of the language and compiler
options, and their conclusion is very often "it depends".

------
xor0110
Long blog/rant about programming languages and more, written by a Julia user
looking for philosophically sound arguments to why you should try #julialang
out.

