danger/u/
This thread is permanently archived
python vs c++

| as someone who's never done any programming in her life and knows next to nothing about it, should i start with python or c++ or something else?


| Python is way easier and as powerful. And people are usually nicer (understand: not as self-centered). C++ is good if you already know another language (ideally C) and you want to do some heavy stuff like fast 3D and the like.
But C++ is hell for a beginner, while Python (version 3.x, do NOT use old versions) allows you to focus on algorithmics. With an IDE like PyCharm, it's really easy and fun.
(And whatever you do, never use JavaScript to learn. Or ideally, never use JavaScript)


| >>0989b2 yeah, i've heard that javascript is bad


| Well, people who use JavaScript for too long become mad.
Like this guy who created a library just to check whether a number is even. Then another one to check if a number is odd, calling the first one and returning the opposite. The funny part being that they are mathematically wrong.
And thousands or people use this for their website.

Jokes aside, JavaScript is full of holes, so if you are experienced with real languages you can handle it, just don't learn programming with it.


| Oh no that title. Do you want to start another war here?


| Doesn't matter. Just start learning without worrying about the "brand".


| >>422833
As someone who learned both and more, i can tell you. If you want to learn programing for fun, then go python. It is extremely easy to handle, and it does his job, though you cant do serious things on it because it is extremely slow too. If you want to go into programming seriously then go c#, as from this language it will be much easier for you to understand java, c++, c and other c like languages, c# being the easiest in the list.


| >>422833
Start with hex-instruction codes or at least with assembly ;-) Then learn what a high-language is, what "paradigms" are and why it needs a compiler (eg. c++), interpreter (eg. python) or a VM (eg. java).
Then you understand everything about performance, usability and maybe security issues and can decide by yourself what language suits best for your project.

Btw. there is a just-in-time compiler for python: pypy
And you can include some c libraries to increase performance.


| Also sometimes bash-programming can be a good solution. Just don't overdo it^^ The advantage is, you don't need to re-invent the wheel. I use it much for batch processing audio, video and graphic files. (ffmpeg + imagemagick).
Also important: learn regular expressions! They can be a very powerful and beautiful solution.


| >>423016 Python is only slow if you don't use it properly.


| >>423025
Which in fact happens more than in c++. And a snail on dope is still a snail compared to a cheetah.


| >>423268
I've seen ugly code in C way more often than in Python.
Moreover, Python lets you use C if you really need performance, and most libraries that need performance already do.
However, most of the times a slow program will come from a bad algorithm, and it's easier to focus on your algorithms when you aren't busy fighting with a stupid syntax, useless colons, and unhelpful error messages.
A snail on dope will go faster than a dead cheetah.


| >>422833
they are completely different and have different applications
Python is quick and easy, used for scripting, prototyping, testing algos and proof-of-concept. C (and C++) is way, way faster performance wise, but more difficult to use.
Also python is interpreted, C is compiled.
Basically start with Python, once you know how python and programing in general works you'll have easier time understanding C++.


| Python is hot trash if you're doing anything longer than a few lines. There's a reason games are made in c++ rather than python.

However, if you want to learn a coding language, I'm going to voice the unpopular opinion here and tell you to learn Batch (windows command language) or linux kernal first. Not only are they totally useless, there is a ton of documentation for them and they do giev a good introduction to code.


| >>423553
Half of what you said made literally no sense

##Dev:Lain##

| >>423553
Did you have a stroke? Linux Kernal?


| >>423553
Any reason to backup the "fact" that Python is trash? Apart from stupid correlations, I mean. Your argument with games is not only wrong as games are made in Python too, but also stupid as Python never intended to be a game programming language.
And I hope your ridiculously stupid talk about batch and linux "karnel" is just a bad trolling attempt. If it's not, then I'm scared of the shit you probably develop...


| There is not really a vs. for me, because I use python and c++ as well. And shell-scripting is cool too. I combine these three things.
Python for simple IO and GUI stuff (pyqt), c++ for the heavy and time-critical stuff and bash script for batch processing and combining existing programs. I always try to keep things tiny and modular via universal interfaces (=textfiles). Python, c++ and tge bash work pretty good together and there already are lots of nice solutions.


| >>423590
I have seen thoses mixes too, but once i learned c++ i always feel like i can do everything i did once on python this time on c++ because i know it will run much faster. As >>423309 said They're completely different and have different purposes, and python is best for scripting and testing algos. Beside that it is not best option.
>>423577 bruh, games in python is like a car with a motorbike engine. Don't put python everywhere, each language has his purpose.


| >>423994
What you don't seem to understand is that you can have Python wrapper around the heavy-processing parts. That's why Python is superior, because you can still go back to lower languages when needed. But the tools and ease of use Python provides are way better than what a low-level language could.
It's not good to "test" algos, but to develop them fully. Fewer bugs, easier modifications, better readability.
Lookup Panda3D if you don't believe me.


| It's not super important what language you program in, just that you get competent enough in one that you're able to transfer your skills later.

That being said, I would pick Python, not because of syntax or speed or what have you, but because there's a billion "learn to code" websites, most of which were originally focused on Python, and are thus good at it. C++ was definitely harder for me to self-learn.


| >>422859 Well now I know why JavaScript always fails my teacher, and consequently me.


| >>422859 we were thought JavaScript in school :(, also, what the hell, cant you just use the modulus operator, and if it returns 0, you know it is even?


| Guys this thread supposed to be about two serious programming languages. Why now talking about JS?


| >>424453
That's the whole point, the guy created a program that would do the same thing as a modulus check, but made it wrong (the results of his function being mathematically incorrect).

>>424458
Because talking about serious programming languages led to talk about the ridiculous ones too, quite logically.

Total number of posts: 25, last modified on: Sat Jan 1 00:00:00 1540795256

This thread is permanently archived