Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

PYTHON AND OTHER LANGUAGES

Name: Anonymous 2007-04-20 10:14 ID:oRRe4oU7

how does python rate as a programming language?
are there better ones?

Name: Anonymous 2007-04-20 10:23 ID:Heaven

One word, Haskell. Thread over.

Name: Anonymous 2007-04-20 11:14 ID:oRRe4oU7

could you give me a little more than that

Name: Anonymous 2007-04-20 11:45 ID:Heaven

>>2
Python is pretty ok. Nothing special, but apart from FORCED INDENTATION OF CODE THREAD OVER and little glitches like some unexpectedly destructive standard library functions and a pretty ugly object system, it's not particularly sucky. The best thing about Python, in my opinion, is the abundance of third-party libraries for almost everything imaginable.

Haskell is much better, though.

Name: Anonymous 2007-04-20 11:45 ID:Olc63u+G

>>1
Programming language?  It's not even Touring-complete.

Name: Anonymous 2007-04-20 12:31 ID:dM1l1rf9

ONE WORD!
THE FORCED INDENTATION OF CODE THREAD OVER!

Name: Anonymous 2007-04-20 12:47 ID:QqOT7HM8

Pros and cons as I see it:

Pros:

+ Excellent overall feature set as a language: builtin Unicode strings, lists, dictionaries, sets, complex and arbitrarily long numbers; pwoerful syntactic slicing; garbage collection; namespaces; keyword arguments; variable and defaulted arguments; syntax for apply and keyword apply (asterisks); first-class functions and classes; closures; decorators; generators; coroutines; list comprehensions and generator expressions; operator overloading; metaclasses; multiple inheritance and mixins; exceptions; reflection; eval, safe eval and sandboxing; threads; and many others I've surely missed.
+ Clean, simple syntax, save for a few rough spots (compare Perl, all rough, or Ruby, rough, save for a few clean spots). Code is very readable and gives you good vibes (at least it does for me). One to two dozen times more maintainable than Perl.
+ Forced indentation of code (statements only), thread over (only fags who don't indent their code hate it, and being forced means it drives non-indenting fags away, or forces them to write readable code).
+ Dynamic typing (quack quack) but strict typing (i.e. flexible type system, ubiquitous polymorphism, no anal stuff, yet no unsafe or crappy automatic conversions and no automatic variables, yet no explicit variable definition besides assignment either).
+ Good functional programming features and tools, and enough extensibility to add others you may want (tail recursion, classic functions such as scanl, memoizing decorators, etc.).
+ Overall good support for imperative, object-oriented, and functional programming, without being pure in either of the three. It allows you to use the right tool for the right job, without forcing anything down your throat and allowing a pretty flexible, even variant programming style.
+ Highly productive. Python sits in the "not wasting your time" bench, together with languages such as Ruby, Lisp or Haskell, and in the opposite of languages such as Java, C++ or Visual Basic. Expect 5 to 10 times higher productivity than Java for medium to large applications; 10 to 15 times higher productivity thn Java for small applications and midnight hacking (I pity the fool who uses Java for his everyday hacking anyways).
+ Good to great standard library full of all sorts of gadgets which are actually simple to learn, use and remember, so it's worth learning them, unlike Java where you'd rather implement yourself some of the shit it offers because it's so grossly overengineered and useless. It's worth mentioning that the library includes Perl-compatible regular expressions.
+ High quality community which produces high quality libraries and modules. To name a few categories: scientific computing,  DNA processing, image processing, OpenGL, Win32, wxPython, KDE, PyGTK, FUSE, mod_python, ... BTW, it's good for GUIs, though it lacks visual tools (there are some, but they are still young).
+ The fastest of the popular interpreted languages (faster than Perl, much faster than PHP and Ruby). There's a dynamic specializator (Psyco) and you can always write your C/C++ (or even *yuck* Java) extension modules, as well as Pyrex modules (subset of Python that gets translated to C).

Cons:

- Statements. They should have been expressions.
- Web application frameworks are fragmented. Instead of having a big, popular, powerful, simple one like Ruby's Rails, it has a bunch of them: MVC frameworks like Rails (TurboGears and Django); 2+ more traditional ones; a simple one that's a bit more like PHP; a huge, Javaish enterprise crap one to avoid (Zope); several lower level ways (webpy, cgis, mod_python...). Because of this, the web community is more fragmented and duplicate efforts.
- Lacks macros. To be fair, all languages except Lisp lack macros, and that's because macros would be hard to implement in non-homoiconic languages. However, I'd fancy lazily evaluated parameters in functions.
- Modules should have been classes (but nested scopes came afterwards). I don't like how modules and packages work much.
- I'd like to have an interpreter that does tail-call optimization.
- Missing an "outer" declaration (similar to global, but looking in the outer scope), which would have been useful for closures due to the way variables are defined in Python (this is coming in Python 3000).
- Regular expressions have an ugly OO interface (easy to fix, already fixed) and lack recursion (not as easy to fix).
- Naturally slower than C. Duh. Hints: your time to develop is far more valuable than hardware. If some large shit runs slow, and you're sure your algorithms are as good as can be (which is usually the case behind bad performance, contrary to popular belief), buy better hardware.

Despite it's very advanced features, it's pretty friendly to beginners and imperative programmers, but it does not allow them to write poor or unsafe code (like PHP does). If you're alrady familiar with another programming language, be it static or dynamic, I recommend you to try Python - you will probably like it and find it very useful and productive.

If you study Python, give it a chance, and still don't like it for some reason, you may also try Ruby, which has a similar feature set, but a slightly different approach.

Name: Anonymous 2007-04-20 16:49 ID:Heaven

JScript .NET > * > ______python______

Name: Anonymous 2007-04-21 0:22 ID:pCCOny5X

>>1 But is it Touring complete?

Name: Anonymous 2007-04-21 5:18 ID:Heaven

>>9
did you mean Turing-complete maybe?

Name: Anonymous 2007-04-21 19:35 ID:N2+6XedU

>>10
Quack

Name: Anonymous 2007-04-22 3:13 ID:2dwcgYqA

>>10
Troll

Name: Anonymous 2007-04-22 14:39 ID:f/3IPBsD

>>10
Stop trolling

Name: Anonymous 2007-04-22 18:47 ID:RjnZwC+r

ONEWORD: THEFORCEDINDENTATIONOFCODETHREADOVER!

Name: Anonymous 2007-04-22 20:49 ID:+G7BcLiS

>>9
5. Any forced meme in /prog/ will be unfunny. No exceptions.

Name: Anonymous 2007-04-22 23:28 ID:4Bd1n85D

>>14
One word, too much COBOL. Thread over.

Name: Anonymous 2007-04-23 5:36 ID:GCh6zZmw

>>16
One word: Turing.

Name: Anonymous 2007-04-23 5:46 ID:q2ERaawT

>>17
Touring, for fuck's sake.

Name: Anonymous 2007-04-23 5:47 ID:GCh6zZmw

>>18
Oh, sorry. Turing.

Name: Anonymous 2007-04-23 5:48 ID:GCh6zZmw

>>18
turing, you jacklass

Name: Anonymous 2007-04-23 5:56 ID:J59Lxe13

>>4
>>7
thank you for the information.
the rest of you are jackasses

Name: Anonymous 2007-04-23 7:53 ID:LAPHj9jb

Name: Anonymous 2009-01-14 12:49

LISP

Name: ​​​​​​​​​​ 2010-10-25 1:00

Name: Anonymous 2012-03-25 14:19

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

All work and no play makes Jack a dull boy

Name: Anonymous 2012-03-25 20:52

javascript

Name: Sgt.Kabu䋒kiman㧡酶 2012-05-29 0:33

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Don't change these.
Name: Email:
Entire Thread Thread List