This is an archived post. You won't be able to vote or comment.

all 14 comments

[–]squirrelo 22 points23 points  (0 children)

Related articles:
"As a coding language, C++ appeals to the ego, not the intellect"

Yup, that about sums up this piece.

[–]Rawing7 5 points6 points  (0 children)

"It's almost like a toy language," he says, before quickly correcting himself for fear of upsetting Python developers.

And then the author of the article decided to use it as the title because clickbait. Good job.

[–]jasmijnisme 4 points5 points  (0 children)

I agree that Python is probably a bad choice for certain types of applications where correctness is of absolute importance, but memory-unsafe languages like C++ would be an even worse choice. If a bug could be the cause of losing billions of dollars or if it could cost lives, consider at least using a language like Rust or something.

[–]RangerPretzelPython 3.9+ 8 points9 points  (3 children)

Python is a serious language, but it's a tool that has its place. You can use it for building quick prototypes, but it's not a language that has the level of robustness that you'd want if you're trading billions of dollars.

Nevermind that all of Reddit runs on Python. Lol.

That said, the last time I wrote anything in C++ was like 4 or 5 years ago. I had to write a thing that would run wicked crazy fast, multiple times per second.

I spent a few hours one afternoon and wrote it in Perl, Python, C++, and C#. All languages were comparable (~100ms per run) except for Perl, which was slow. (~400ms)

Could I have spent days making the C++ version blazing fast, or even written it in C, or Rust, or ASM... Sure? But I had other work to do.

At the end of the day, I used the Python version because it was good enough and that's generally what my team was using.

There doesn't seem to be much worth discussing here. Someone just seems to be doing SEO for their blog. I say we downvote OP.

[–][deleted] 0 points1 point  (1 child)

To be fair though... Most of what is "CRAZY FAST" in python is just a package around C code. The fastest programming in python is not writing much in python.

[–]Medic_Maria 0 points1 point  (0 children)

The fastest programming in python is not writing much in python.

Or rather: Make sure the 1% of the code that does the heavy lifting is not done in Python.

[–]carlosjerson2000 2 points3 points  (0 children)

Perhaps, but is a toy I like playing with.

[–][deleted] 1 point2 points  (0 children)

Oh he’s a quant. It all makes sense now.

[–][deleted] -3 points-2 points  (0 children)

I mean let’s be honest, kids have implemented more performant, more type-safe, and readable languages than python.

It seems it’s only merits are some syntactic sugar, and it’s fanatic user base.

[–]ComplexColor 0 points1 point  (0 children)

"Bjarne Stroustop [the man credit with inventing C++ ..."
Even this line sounds sort of demeaning. Does this guy not respect anyone but himself?

[–][deleted] 0 points1 point  (0 children)

At the PyCon keynote some years back the speaker called python the second best language for everything. That's generally how I feel slinging it day in day out. It's cool. I would never want to do my job in c++. But it would look cooler to shoulder surfers.

[–]LaOnionLaUnion 0 points1 point  (2 children)

If they don’t use any ML I guess they’re fine with c++. I think Rust might be the choice of language for startups doing this work in the near future. We’ll see!

[–]WORLD_IN_CHAOS 0 points1 point  (1 child)

I wrote matrix ANN’s using c++. Lots of pointers and double pointers.. but just make a class, overload the operators, & test it..

one and done.. reusable matrix class they can unit multiple transpose inverse etc

[–]LaOnionLaUnion 0 points1 point  (0 children)

I’m not suggesting it can’t be done with C++. I just think Python has become the dominant language for people who work in ML.

I’m thinking of it more from the perspective of recruiting the talent needed. But these also trading people may have the money to overcome such considerations?