11
BadFox
6y

So, what are your thoughts on Python?

Comments
  • 7
    I really like Python. It's a great language for beginners to start on. It's pretty powerful for more advance stuff. Django is a nice framework. Flask is a nice minimalistic framework.

    Package management is kinda insane, but you get into the same issues with Ruby and Perl. If you install packages, I highly suggest `pip install --user <packagename>` which will keep packages in your home directory and separate them from system packages (same with `gem install --user <package>` for Ruby).

    The PEP8/pythonstyle standard is pretty nice and I wish more languages had it. Syntax is clean too.

    The bad: you don't have type and types are really helpful. When you really get into writing Python, be sure to write tests! pytest and rspec are you friends in languages without strong typing!
  • 1
    @djsumdog These explanations are why I read devRant. Thanks.
  • 2
    Always wanted to get into it but im too comfortable with java 😭
  • 3
    @djsumdog what do you mean by type? is it data types ? you can strictly make it specific. something like :

    age:int
  • 1
    @aureliagbrl or
    def div_age(age:int) -> float :
    --- return age / 3
  • 2
    Love the language. Really easy to get from concept to implementation with mininal fuss. It really gets out of your way due to the language naturally tending to be readable. We have some great resources regarding style guides like pep8(as mentioned before) and great battle tested web frameworks like django and flask(as mentioned before as well!)

    It is also outstanding for machine learning. I used it through school for every math class I had to take(calculus, all algebra classes etc) and it was a complete badass tool that gave me powers. You can get some static typing with it. Which only makes python that much of a no brainer and has always been a favorite.

    Only complaint: whitespace as block delimiter. But one gets used to that.
  • 2
    IMO

    pros:
    - easily accessible os api, like in perl
    - no need to compile
    - lots of libs
    - js-and-groovy-like syntactic sugar
    - automatic memory mgmt

    cons:
    - not explicitly typed
    - fucking identation for code blocks
    - distorted oop principles
    - mandatory self param in methods
    - harder to debug than java
    - lack of verbosity
    - absence of classic syntactic elements
    - no switch-case [i know, dicts. Still far from switch!]

    I see more cons and it's quite repelling for me. Although its pros are worth attention...
  • 0
    @djsumdog your disadvantage makes no sense, python not only has types (or whatever you were trying to say) but is a hard typed language
  • 1
    beside all these qualified comments i'd like to add that learning it is exactly like http://devhumor.com/media/... but i guess this counts for any language.
    some existential crises later i still hope for it to be universal usable for scripting as well as application developement. since i am terrible at maths i can't say anything about ml and these advanced stuff.
    oh, and no need for compiling suits my normal coding style of run-error-ohatypo-run-error-nexttypo-run-slightchange-run-error...
  • 1
    @Shardj wtf is a "hard typed" language supposed to be?

    Not a Python pro, but I'm pretty sure those are just type hints and not something that is assigned statically
  • 1
    @Krokoklemme variables cannot be implicitly coerced to unrelated types
  • 1
    Although this feature doesn't make Python strong typed, type hints have been added in the latest versions (as mentioned above already) for code clarity :) A nice touch imho
  • 0
    @TheItalianGuy that is the definition of a strongly typed language, so yes that does make it strongly typed
  • 1
    @Shardj Apologize, I meant to write statically typed!
  • 2
    @TheItalianGuy fair enough, very different. Python is strongly dynamically typed
Add Comment