Author Topic: Is learning python a wise choice when you already know C++ ?  (Read 1853 times)

0 Members and 1 Guest are viewing this topic.

Offline PsychoRebellious

  • Peasant
  • *
  • Posts: 130
  • Cookies: -6
    • View Profile
    • My Rantings
I do not want to jump in the argument that 'I think I only c++ and it takes years to master it'. I know that already, this is not that kind of question. I am trying to improve my C++ skills. I've studied database programming, sockets programming, some GUI programming with allegro yet, and I'm looking forward to study more (Currently taking a start with QT).
All this time I've been dodging lose syntax languages like Python in order to not have bad programming habits. Like the variable type defining not a requirement with PHP had me have bad habits in C++(when I reverted back to it after a long time), and the no semi-colon ending statements in JS gave badder habits.
The point is, what are some pros and cons of Python? I will not be using it for GUI as I'm learning QT already. pyGame, yes, it is one thing I want to learn python for, or maybe using it for server side scripting. Apart from that what are some pros and cons of Python(a question from those who are already into this language, and 'You should learn it just because its a language', is not an answer- I look forward to enrolling in robotics and so i will be learning assembly on some magical day, and  i want to use programming for purposes like data mining and cryptography and not just developing pretty looking applications. I want to do something advanced with programming, Idc how long it takes)
Taking all that in account, is Python worth it?

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #1 on: March 08, 2015, 10:10:01 am »
Every language is worth learning (except perl) because it expands your horizons.

To answer directly, yes learn Python, it's one of my top 5 most used languages.

If you don't mind the whitespacing rules and are moderately confident in C++ python will be an easy transition.
« Last Edit: March 08, 2015, 10:10:35 am by HTH »
<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #2 on: March 08, 2015, 10:38:25 am »
Languages like python will only decrease the use of bad practices. And the biggest pro is that it's a rapid development language, so it is filled with lovely and neat tricks to get things done correctly and fast.
~Factionwars

Offline KryDos

  • Serf
  • *
  • Posts: 42
  • Cookies: 8
  • Software Engineer, Emacs uesr
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #3 on: March 08, 2015, 10:39:33 am »
Every language is worth learning (except perl) because it expands your horizons.



Offline Phage

  • VIP
  • Overlord
  • *
  • Posts: 1280
  • Cookies: 120
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #4 on: March 08, 2015, 02:21:01 pm »
Every language is worth learning (except perl) because it expands your horizons.

You just rocketed to the top place on my list of favourite people (You've always been in the lead, of course). <3 
« Last Edit: March 08, 2015, 10:23:46 pm by Phage »
"Ruby devs do, in fact, get all the girls. No girl wants a python, but EVERY girl wants rubies" - connection

"It always takes longer than you expect, even when you take into account Hofstadter’s Law."

Offline Axon

  • VIP
  • King
  • *
  • Posts: 2047
  • Cookies: 319
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #5 on: March 08, 2015, 07:52:37 pm »
Is perl better than python in terms of power and functionality? What's so special about perl!
« Last Edit: March 08, 2015, 07:53:13 pm by Axon »

Offline KryDos

  • Serf
  • *
  • Posts: 42
  • Cookies: 8
  • Software Engineer, Emacs uesr
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #6 on: March 09, 2015, 02:28:16 am »
Is perl better than python in terms of power and functionality? What's so special about perl!

It's not better. But it's also not worse.

Perl was my first programming language so I love it so much. But there are no good languages or bad languages. It's all depends from task which you're going to do.

Also, I think, any language could be bad/good, because of personal preferences. Similar to real life. You can not love blonde or brunette but it doesn't mean that blonde or brunette are bad, right?

I hope that for peoples who says that one language is better than another, already prepared special boiler in the hell.
P.S.
All my text above, of course, does not apply to languages like Brainfuck or Moo or etc...

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #7 on: March 09, 2015, 03:32:24 am »
I won't start that conversation here, KryDos if you'd like you are free to post some perl source code or hwat have you in another thread and try and convert some non believers to your language :)

In my experience, perl is only useful to know so you can download a different scripting language's interpretor. (or dealing with the poor poor sysadmins who used it as a Bourne Shell Extension..)

Feel free to prove me wrong (by posting cool code), or even start a topic so we can debate it! (I do find it cool that I can uuencode my perl scripts and not even notice though)

But now, let's keep this thread clean please guys. Discussion based on OP's question.
« Last Edit: March 09, 2015, 03:33:56 am by HTH »
<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

Offline PsychoRebellious

  • Peasant
  • *
  • Posts: 130
  • Cookies: -6
    • View Profile
    • My Rantings
Re: Is learning python a wise choice when you already know C++ ?
« Reply #8 on: March 09, 2015, 07:54:20 am »
Every language is worth learning (except perl) because it expands your horizons.

To answer directly, yes learn Python, it's one of my top 5 most used languages.

If you don't mind the whitespacing rules and are moderately confident in C++ python will be an easy transition.
I am moderately confident with C++, and whitespacing, I recently read an article about some whitespacing Python rules. Weird, if you ask me. In C++, we don't care about whitespace.
Languages like python will only decrease the use of bad practices. And the biggest pro is that it's a rapid development language, so it is filled with lovely and neat tricks to get things done correctly and fast.
Neat tricks, that is what tempts me to learn Python. I see people doing the same things with python in far less code then it would usually take in C/C++, but I wonder if it gives you the same power

Offline HTH

  • Official EZ Slut
  • Administrator
  • Knight
  • *
  • Posts: 395
  • Cookies: 158
  • EZ Titan
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #9 on: March 09, 2015, 09:59:12 am »
im not sure if id say that people coding in C++ dont care about white space.. more that its not enforced.

Nobody enjoys that fucker who doesnt seem to have a tab key.

and of course C++ is more "powerful" than Python. They are different tools, you wouldn't
t use a sledge hammer to hang a picture and I sure as fuck hope you wouldn't try and make C++ a scripting lanaguage.
<ande> HTH is love, HTH is life
<TurboBorland> hth is the only person on this server I can say would successfully spitefuck peoples women

Offline KryDos

  • Serf
  • *
  • Posts: 42
  • Cookies: 8
  • Software Engineer, Emacs uesr
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #10 on: March 09, 2015, 01:54:02 pm »
Quote
I won't start that conversation here, KryDos if you'd like you are free to post some perl source code or hwat have you in another thread and try and convert some non believers to your language :)

Excuse me about that.

PsychoRebellious, as HTH said, you should not use compiled language as scripting language. You can but it's not productive.

Python is awesome but, as for me, the main problem with this language it's syntax. If you used to it then it can be very hard to switch to language with "usual" syntax". Keep that in mind.

C++ is awesome too, but you have to use it if you know what you're doing, and of course if you're going to write, for example, html parser it would be much better if you'll select Python instead of C++.

Also. C++ is compiled and not crossplatform language (strictly speaking). If you compiled program on Windows and then will send it to me I will not run it because I'm on OSX (it will not run on Linux too).
But using Python, you can sketch a script and send it to everyone and if they have Python installed they will run your script. OSX and Linux have Python installed by default.

And maybe last thing... You have to understand the difference between compiled and interpreted languages. Compiled language makes program for your CPU and your CPU can read and execute this program. In case of interpreted languages (lets say Python) you have a script which executes on Python level (you can think about it as about Virtual Machine, like VirtualBox). Python is executing on CPU level but your script is executing on the Python level (it's not really truth but simplistically talking...)

The main point here is you have to understand that Python is slower than C++ and it can't be faster.
So, Python allows you to make programs faster and easier but this programs will be slower than C++ programs. C++ allows you to make fast programs but you can spend too much time to do this especially if you don't know C++ well.

And my suggestion:
Learn Python. You will be happy :)

Offline kenjoe41

  • Symphorophiliac Programmer
  • Administrator
  • Baron
  • *
  • Posts: 990
  • Cookies: 224
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #11 on: March 09, 2015, 03:23:58 pm »
PsychoRebellious, as HTH said, you should not use compiled language as scripting language. You can but it's not productive.

You should come try out some Golang. Syntax is simpler than even the python syntax, faster than python and nearly approximating the other C family langs.
If you can't explain it to a 6 year old, you don't understand it yourself.
http://upload.alpha.evilzone.org/index.php?page=img&img=GwkGGneGR7Pl222zVGmNTjerkhkYNGtBuiYXkpyNv4ScOAWQu0-Y8[<NgGw/hsq]>EvbQrOrousk[/img]

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #12 on: March 12, 2015, 12:08:19 pm »
You should come try out some Golang. Syntax is simpler than even the python syntax, faster than python and nearly approximating the other C family langs.
Let the poor fella learn python.
~Factionwars

Offline srirachasauce

  • /dev/null
  • *
  • Posts: 17
  • Cookies: -2
    • View Profile
Re: Is learning python a wise choice when you already know C++ ?
« Reply #13 on: March 27, 2015, 04:17:06 am »
Strong understanding C++ means that you can flexibly jump to other languages with ease. You will find yourself becoming spoiled with scripting languages like Python, but when you need razor sharp performance the answer will be C++. But it also depends on what you'll be doing. Not like you'll want to design a web application in C++, but you can do that and more with something like Python.

Wide adoption of community tested and designed modules v.s. from the ground up and in most cases from scratch. Not like anybody ever got mad that they knew more than one programming language. Fuck it -- learn them all.

You should come try out some Golang. Syntax is simpler than even the python syntax, faster than python and nearly approximating the other C family langs.

But you have to declare types way more often D: Lazy people like me hate that. I do love me some golang though -- multi-platform for the win.
« Last Edit: March 27, 2015, 04:19:12 am by HTH »