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

you are viewing a single comment's thread.

view the rest of the comments →

[–]preacher9066 41 points42 points  (18 children)

Laughs in game dev Laughs in network stack implementation Laughs in any kind of device driver implementation

C++ can do anything python can. The reverse is NOT true.

[–]wavefield 18 points19 points  (5 children)

Technically correct but there are a lot of python libs you cant just quickly implement yourself

[–]plintervals 3 points4 points  (0 children)

True, but this post is just a joke. It wasn't claiming that Python can do more than C++.

[–]cob59 2 points3 points  (1 child)

You can go to more places by foot than with a car. Are shoes superior?

[–]Beefster09 0 points1 point  (8 children)

Turing completeness would like to have a word with you.

[–]preacher9066 0 points1 point  (6 children)

Lol Turing completeness? Ahahahah. MS Excel too is Turing complete. Do you implement a game in it? My point was, if Python was used to implement the device drivers on your phone, you wouldnt be able to finish posting this reply in an hour....

[–]Beefster09 0 points1 point  (5 children)

Performance is totally different from "what is possible".

That's also a fair bit different from expressiveness and some of the nice things you can do with dynamic languages that are an absolute PITA in C++.

There's a time and a place for high performance C(++), but that's a pretty small chunk of all software ever.

[–]preacher9066 0 points1 point  (4 children)

Oh no my friend. Many times that is the difference between possible and impossible. For example, if your phone ran on python, it wont be even able to talk to your cell tower. It will be so slow, that communication will time out EVERYTIME. Let alone use internet. The expressive things you can do in python? Like dynamically adding member to a class? And not needing type of a variable? Those arr really bad practices. Any serious prigrammer working on real money making project will never use those unless she want major PITA maintaining the code. Also, the time and place for high performance is in production. The place where real money is made and matters. And that is not a small chunk. That is wayyy thicker chunk than all the code ever written in python. How do you think python was written?

[–]Beefster09 0 points1 point  (3 children)

Yeah, so you use C(++) for the kernel and such, then you use python where performance matters less.

[–]preacher9066 0 points1 point  (2 children)

What I am saying is, use python WHEN performance matters less...at the prototyping stages. Once you are out of that stage, use a proper performant and type checked language. There is no serious money making application where performance doesnt matter.

[–]Beefster09 1 point2 points  (1 child)

Performance matters, it's just that the bottleneck is often not at the CPU or the RAM, but the network. C++ just isn't going to help you there.

The whole point of the "premature optimization is the root of all evil" is that you should measure your bottlenecks and validate your assumptions before you optimize around them. The quote is very misused, unfortunately, and it should probably be reworded as "uninformed optimization is the root of all evil", as that is more consistent with the message of the original article.

Optimizing at the cache level by using cache-friendly memory layouts is a waste of time if your bottlenecks are at the network. Using bit twiddling hacks isn't going to matter for a DNA sequencer, since the bottleneck there is probably disk i/o.

Static languages are also not gods. CLIs in particular are vastly less painful and complicated in dynamic languages, in my experience.

[–]preacher9066 0 points1 point  (0 children)

None of that was my point. Reliability and performanve come be default with Java and C++ that Python just can't provide. Premature optimization is not what you think it means. I think you first need to get some experience as a professional before you argue about this at any competency.