Why Use C++ and Not Python

preview_player
Показать описание

Рекомендации по теме
Комментарии
Автор

when I first started learning programming I thought I could do anything with python, as time went on I slowly realised that there’s many languages for a reason

iestyn
Автор

Because Python is not the right tool for the task. Remember, programming languages are just tools.

kirarevcrow
Автор

A very respectful answer. No arrogance.

jacobfk
Автор

Cos Python is basically the duplo of programming

MikeWmusic
Автор

What was the context of this question? What was being programmed at the time?

superscatboy
Автор

Python’s mqueue implementation put 48 bytes of garbage on my queue. My C implementation was perfect on the first try

mattmurphy
Автор

Good answer - do it using the tool you're proficient with, and if it can also teach a few things, why the heck not. Your autorelease container was neat, if a bit verbose hehe (but this is C++ after all) - and just as you said, in Python you'd pretty much just call the same APIs either fully runtime with ctypes, either making is faster (and spicier hehe) with cffi or Cython.

cheaterman
Автор

Rephrased question: why C++ and not the scripting language built on c/c++ libs 😂

AbstractType
Автор

Should go a step ahead than calling python as "wrapping around C++". Python is interpretive language, and by its nature extremely slow vs the compiled language. Calling Python-wrappers for C functions is way slower than just calling the corresponding C function in C.

But Python definitely has its use-case: it's really great for brainstorming sessions, I don't have to fret over segmentation faults, data-typing, function templates, some obscure system error while thinking about the blueprints for a project. Python has kind of cornered the Deep Learning "market" as well, although Caffe for C/C++ might be a worthy match for Tensorflow in Python (I am not finding much encouraging details for using Tensorflow in C/C++).

Python got a thriving community, almost any field of engineering/physics/chemistry (maybe even biology) you can think of, has a still alive module available for easy use.

maxborn
Автор

I've already done this in python, wrote a whole ass api, and its slow. Slow slow slow.

SecondLight
Автор

doing these types of system level things on a system with first class support also helps when youre stuck on something.

using C# in a windows environment for windows system work is way easier

BeansEnjoyer
Автор

where did you get std::print? which compiler do you use?

Принуждениекмиру-ьц
Автор

ehh the winapi is very high level, you’re not really interacting that closely to os, but besides that python is unreadable and slow garbage

lobotomy-victim
Автор

Makes me laugh when people call C a low level language..
I mean, it relatively *is* nowadays, but only if you are thinking relatively.

ColinRichardson
Автор

Python is hot garbage. For a shit language that was invented before most of its end users were born it’s weird how colleges teach computer science in it. I had to make my own vector, list, iterator and so on in data structures. In C++ of course. I think it was a mistake to step away from that. Why not just use QBasic 😂

jonweinraub
Автор

is there a Better alternativ to ImGui?

pixelcatcher
visit shbcf.ru