Click here to Skip to main content
15,912,082 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Why Python? Pin
BobJanova2-Jun-14 6:18
BobJanova2-Jun-14 6:18 
GeneralRe: Why Python? Pin
SkysTheLimit2-Jun-14 7:58
SkysTheLimit2-Jun-14 7:58 
GeneralRe: Why Python? Pin
jesarg2-Jun-14 8:50
jesarg2-Jun-14 8:50 
GeneralRe: Why Python? Pin
V.2-Jun-14 9:03
professionalV.2-Jun-14 9:03 
GeneralRe: Why Python? Pin
Frank R. Haugen2-Jun-14 9:19
professionalFrank R. Haugen2-Jun-14 9:19 
GeneralRe: Why Python? Pin
jschell2-Jun-14 9:27
jschell2-Jun-14 9:27 
AnswerRe: Why Python? Pin
David Crow2-Jun-14 9:27
David Crow2-Jun-14 9:27 
GeneralRe: Why Python? Pin
irneb2-Jun-14 20:35
irneb2-Jun-14 20:35 
Python isn't bad, especially compared to C-like languages like C#/Java. You get (out the box) at least the same libraries as you do for DotNet/JVM, and then some (as Python's own built-in libs are enormous compared to most others).

The thing which Python does "really" well is the ease of using much more complicated data structures (lists, hashtables, etc. are no more complicated to use than arrays in C). Other stuff are things like a REPL (though not as perfect as Lisp/Hasskell's). Really clean code - it's sometimes referred to as an exact 1:1 translation of pseudo code. It provides some functional paradigms, but not a full fledged FP language. No strict OO - i.e. a function need not be part-n-parcel of a class. Much less code to write than C#/Java to get the same thing. OO concepts in it's imports statement, e.g. you can import an entire "package" normally, then refer to it's internals using the OO-dot-notation, or using the * wildcard to import the internals as if loaded locally, or import a single internal without the rest of the package. It has a very large community, thus mentors and examples are not difficult to find.

There are some issues with Python:

Dynamic typing - though this isn't necessarily a problem. But for someone coming from a C-like language you'd probably miss the explicit typing. The biggest possible issue I can see with this is some error checks are impossible which are possible in a explicitly- (C) or inferred (Haskell/F#) typed language. Though there are alternatives - e.g. PyLint.

It's interpreted by default, though some of its implementations do compile. E.g. CPython compiles to pyc files on the fly (these are similar to Java's class files in that they're bytecode to be run through the PVM. Others also add high optimization (e.g. PyPy), compiling to other VM's (e.g Jython for JVM, IronPython for DotNet), and binary compiling comparable to most other languages (e.g. Nuitka).

Non-pure closures, it's version of lexical scoping is a bit weird - and therefore pure FP isn't possible. But this you only notice if you're used to a full FP language (like Scheme / F# / Haskell / etc.) - you'd not notice the difference if you come from a procedural language like C. This has been alleviated a bit in Py 3 with its nonlocal keyword though.

Python (as is) doesn't do multi-threading, not easily at least. But there is the multiprocess interface, easy to use, but means more RAM for processes than threads.

Only single-line lambdas are possible.

It's OO method's a bit "strange" in that the member functions need to explicitly receive a "self" parameter (similar to how CLOS works for Common Lisp), but you call that member function the normal dot-notated way (like in Java/C#/Pascal/etc.) I find this a bit schizophrenic.

Other issues with it's OO, e.g. no means of making hidden fields (there's no private/protected/internal/etc. decorations - only a convention that a underscore prefix means it's intended to only be used inside the class).

So Python has it's troubles, but so has every other language I've even come across. But what I would suggest to your friend: Don't stop at Python. It's good for learning the broader concepts about programming, but at some point you need to look deeper into the details also - thus it might be very good to move onto C after Python, and then onto a more "normal" OO like Java/C#. And then to really get into the FP bracket, Scheme/Haskell.

modified 3-Jun-14 2:47am.

GeneralRe: Why Python? Pin
Fabio Franco3-Jun-14 1:40
professionalFabio Franco3-Jun-14 1:40 
GeneralRe: Why Python? Pin
John Clegg3-Jun-14 0:23
professionalJohn Clegg3-Jun-14 0:23 
GeneralRe: Why Python? Pin
jibalt3-Jun-14 1:29
jibalt3-Jun-14 1:29 
GeneralRe: Why Python? Pin
Fabio Franco3-Jun-14 1:37
professionalFabio Franco3-Jun-14 1:37 
GeneralRe: Why Python? Pin
A. A. J. Rodriguez3-Jun-14 3:25
A. A. J. Rodriguez3-Jun-14 3:25 
GeneralRe: Why Python? Pin
Kirk 103898213-Jun-14 5:14
Kirk 103898213-Jun-14 5:14 
GeneralRe: Why Python? Pin
rellips3-Jun-14 5:17
rellips3-Jun-14 5:17 
GeneralRe: Why Python? Pin
Kenneth Kasajian3-Jun-14 6:28
Kenneth Kasajian3-Jun-14 6:28 
GeneralRe: Why Python? Pin
suzuwatari3-Jun-14 6:56
professionalsuzuwatari3-Jun-14 6:56 
GeneralRe: Why Python? Pin
RafagaX3-Jun-14 10:00
professionalRafagaX3-Jun-14 10:00 
GeneralRe: Why Python? Pin
budryerson4-Jun-14 7:43
budryerson4-Jun-14 7:43 
GeneralFor you APOD fans Pin
Marc Clifton2-Jun-14 3:39
mvaMarc Clifton2-Jun-14 3:39 
GeneralDishwasher and GoPro Pin
DaveAuld2-Jun-14 3:37
professionalDaveAuld2-Jun-14 3:37 
GeneralRe: Dishwasher and GoPro Pin
Rage2-Jun-14 3:43
professionalRage2-Jun-14 3:43 
GeneralRe: Dishwasher and GoPro Pin
chriselst2-Jun-14 3:59
professionalchriselst2-Jun-14 3:59 
GeneralRe: Dishwasher and GoPro Pin
Nagy Vilmos2-Jun-14 4:12
professionalNagy Vilmos2-Jun-14 4:12 
GeneralRe: Dishwasher and GoPro Pin
Mark Parity2-Jun-14 4:17
Mark Parity2-Jun-14 4:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.