Jump to content


Python


  • You cannot reply to this topic
8 replies to this topic

#1 Nick

    Senior Member

  • Members
  • PipPipPipPip
  • 1225 posts

Posted 03 May 2007 - 02:14 PM

Hi all,

Should every self-respecting programmer consider learning Python, or does deep C++ knowledge supersede it?

My university is giving a free introductory tutorial, and I wonder if it's worth my precious time. :happy: I'm interested in learning new concepts and paradigms, but if it doesn't offer anything refreshing then I might as well skip it. From what I've heard it's an interpreted language, which isn't an exciting start to me...

Cheers,

Nicolas

#2 .oisyn

    DevMaster Staff

  • Moderators
  • 1822 posts

Posted 03 May 2007 - 03:17 PM

Every self-respective programmer can learn any language by just looking at it's documentation and searching the internet, you don't need a university for that ;)
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#3 SamuraiCrow

    Senior Member

  • Members
  • PipPipPipPip
  • 459 posts

Posted 03 May 2007 - 03:38 PM

Python has a bytecode similar to Java, (and can generate Java bytecode as well if you use Jython,) which will work on all platforms without recompiling (or debugging separately on each platform).

Mostly the new features you'd find in Python are that a hash-map is implemented as a primitive datatype and coroutines can be implemented since version 2.4 (although I think they're called something else in the manuals).

If your university is anything like mine, the tutorial will likely be geared toward sever-side web scripting rather than games.

#4 roel

    Senior Member

  • Members
  • PipPipPipPip
  • 697 posts

Posted 03 May 2007 - 03:50 PM

And if your university is anything like mine, they'll say "Make a gnutella/freenet implementation using python. Learn it." ;)

#5 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 03 May 2007 - 03:57 PM

Although you could learn Python very easily yourself you'd still be writing C++ in Python...

What I'm trying to say is although the syntax should be easy to understand, the way you do it might not be obvious.

For instance, do you know what duck-typing is? It doesn't exist in C++ and can really cut down on the ammount of code you need to write.

If you're worried about Python being slow:
http://psyco.sourceforge.net/
http://codespeak.net...y/doc/news.html

#6 .oisyn

    DevMaster Staff

  • Moderators
  • 1822 posts

Posted 03 May 2007 - 04:12 PM

dave_ said:

Although you could learn Python very easily yourself you'd still be writing C++ in Python...
If you're a die-hard C++ programmer who refuses to learn other paradigms that is ;). By learning a language I also mean learning it's standard paradigms, not only the syntax. If you're only interested in the syntax, you're not a self-respective programmer. Well, in my opinion at least.

dave_ said:

For instance, do you know what duck-typing is? I doesn't exist in C++
Actually it does exist in C++ and they are used heavliy in the standard library. Iterators and allocators are good examples. /nitpicking
C++ addict
-
Currently working on: the 3D engine for Tomb Raider.

#7 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 03 May 2007 - 07:37 PM

I know, I'm hardcore C++, I can't think of infalible python examples.
Templates do have duck typing, but its not general for the language.
The point still stands.

#8 Nick

    Senior Member

  • Members
  • PipPipPipPip
  • 1225 posts

Posted 03 May 2007 - 11:12 PM

.oisyn said:

Every self-respective programmer can learn any language by just looking at it's documentation and searching the internet, you don't need a university for that ;)
Sure, but if they're giving a class anyway...

dave_ said:

For instance, do you know what duck-typing is? It doesn't exist in C++ and can really cut down on the ammount of code you need to write.
I hadn't heard of it before. Looking at the Wikipedia description I don't feel like I've missed something though. If I want something to behave like a duck, I inherit the duck's interface. Requiring less code to be written is overrated.

Thanks everyone for the information and opinions!

#9 eddie

    Senior Member

  • Members
  • PipPipPipPip
  • 751 posts

Posted 03 May 2007 - 11:51 PM

I enjoy Python. I like using it for it's functional-programming style functions (filter/map/reduce) and it's very fast application development.

That said, my latest craze is Lua - so I haven't touched Python in a long time. I found embedding Python to be a chore, and Lua offers me almost everything Python does plus more through super easy extension.

On the language tip, I find that every language I can-learn/try to be a good thing. It's just a matter of finding the time to do it. ;)





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users