Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #81836
| Date | 2014-12-02 22:23 -0700 |
|---|---|
| From | Michael Torrie <torriem@gmail.com> |
| Subject | Re: Python handles globals badly. |
| References | <c3363$547e74fe$5419aafe$24179@news.ziggo.nl> <mailman.16509.1417576416.18130.python-list@python.org> <b257d$547e9225$5419aafe$17940@news.ziggo.nl> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.16516.1417584217.18130.python-list@python.org> (permalink) |
On 12/02/2014 09:32 PM, Skybuck Flying wrote: > Some issues I'd like to address to you: > > 1. Structured programming requires more programming time. > 2. Structured programming implies structure which might be less flexible. > 3. Python objects require "self" keyword to be used everywhere, and other > akwardness wich leads to more typing/programming/writing time. You forgot to mention that horrible white-space being syntax! Surely that is inflexible and awkward! > I used to program in Delphi, there I would do everything OO and modular. Python allows you to explicitly use an OO paradigm if you wish, or use a more procedural form, or functional form (to a degree anyway). All the while using and exploiting object-oriented characteristics (modules, attributes, etc) throughout. It's really the best of both worlds. > Lastly I also don't like the module approach in python because the sikuli > ide doesn't really support working with multiple files that well. A poor craftsman blames his tools for his own shortcomings. I suggest you change tools to something a little more flexible (just about anything really) > Even if it did, having all code in one big file is a pretty big adventage. Not really. Keeping things as simple as possible and modular is easier to debug, easier to test, add features to, and easier to understand three months from now. I can tell by your opinions that you've never done any medium to large-scale development before. > So features I miss in python are: "labels" "goto statements" and "repeat > until". Python is newbie friendly (mostly), but it is a far, far more powerful, capable, and expressive language than Delphi ever was. Take a theory of computer languages class some time (create your own language even... Scheme is a good place to start). It might open your eyes a lot. Python is not just a scripting language, it's a powerful application development language that allows me to create code rapidly that actually works. I'm far more productive in Python than in any language I've used to date. > > Funny thing is these goto statements would be very handy for bot > programming, so it's a painfull feature to miss. Haven't heard that argued in many years. And I don't see how. Python has very powerful ways of dispatching execution including dictionaries of functions, callable objects, etc. Sounds like you're programming in a very primitive way, reinventing many structures that Python already has. I know that some low-level C programming does rely on and use goto, but in Python I've never needed it. You're not the first person to not grasp Python fundamentals (such as how variables work with name binding vs the Delphi idea of named boxes that can actually be change; python variables can only be rebound to new objects, unless you call a method on a mutable object), who ends up fighting the language and being really frustrated with it. Sounds like you're trying to code Pascal (or some other language) in Python. This is going to be frustrating. I suggest you learn what it means to code in a "Pythonic" way and you'll find you are really productive and having a lot of fun.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python handles globals badly. "Skybuck Flying" <skybuck2000@hotmail.com> - 2014-12-03 03:27 +0100
Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2014-12-03 13:35 +1100
RE: Python handles globals badly. "Clayton Kirkwood" <crk@godblessthe.us> - 2014-12-02 18:53 -0800
Re: Python handles globals badly. Michael Torrie <torriem@gmail.com> - 2014-12-02 20:13 -0700
Re: Python handles globals badly. "Skybuck Flying" <skybuck2000@hotmail.com> - 2014-12-03 05:32 +0100
Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2014-12-03 15:42 +1100
Re: Python handles globals badly. Dave Angel <davea@davea.name> - 2014-12-03 00:02 -0500
Re: Python handles globals badly. Michael Torrie <torriem@gmail.com> - 2014-12-02 22:23 -0700
Re: Python handles globals badly. Marko Rauhamaa <marko@pacujo.net> - 2014-12-03 08:52 +0200
Re: Python handles globals badly. Joel Goldstick <joel.goldstick@gmail.com> - 2014-12-03 02:17 -0500
Re: Python handles globals badly. Joshua Landau <joshua@landau.ws> - 2014-12-03 13:07 +0000
Re: Python handles globals badly. mm0fmf <none@mailinator.com> - 2014-12-03 18:04 +0000
Re: Python handles globals badly. sohcahtoa82@gmail.com - 2014-12-03 10:16 -0800
Re: Python handles globals badly. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-04 11:57 +1100
Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2014-12-04 12:10 +1100
Re: Python handles globals badly. Joel Goldstick <joel.goldstick@gmail.com> - 2014-12-03 20:23 -0500
Re: Python handles globals badly. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-12-03 22:57 -0500
Re: Python handles globals badly. Michael Torrie <torriem@gmail.com> - 2014-12-03 21:11 -0700
Re: Python handles globals badly. Ben Finney <ben+python@benfinney.id.au> - 2014-12-03 14:21 +1100
Re: Python handles globals badly. "Skybuck Flying" <skybuck2000@hotmail.com> - 2014-12-03 05:17 +0100
Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2014-12-03 15:36 +1100
Re: Python handles globals badly. Tony the Tiger <tony@tiger.invalid> - 2014-12-04 20:27 +0000
Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-12-03 12:35 +0000
Re: Python handles globals badly. "Skybuck Flying" <skybuck2000@hotmail.com> - 2014-12-04 00:02 +0100
Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-12-04 01:32 +0000
Re: Python handles globals badly. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-12-03 23:01 -0500
Re: Python handles globals badly. jtan <admin@grails.asia> - 2014-12-04 13:03 +0800
Re: Python handles globals badly. Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-12-04 22:35 +1100
Re: Python handles globals badly. jtan <admin@grails.asia> - 2014-12-04 22:38 +0800
Re: Python handles globals badly. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-12-04 10:24 +0000
Re: Python handles globals badly. Chris Angelico <rosuav@gmail.com> - 2014-12-04 21:29 +1100
Re: Python handles globals badly. Marko Rauhamaa <marko@pacujo.net> - 2014-12-04 14:51 +0200
Re: Python handles globals badly. Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-12-04 20:56 -0500
Re: Python handles globals badly. William Ray Wing <wrw@mac.com> - 2014-12-04 23:17 -0500
Re: Python handles globals badly. alister <alister.nospam.ware@ntlworld.com> - 2014-12-04 19:54 +0000
Re: Python handles globals badly. Peter Pearson <pkpearson@nowhere.invalid> - 2014-12-03 20:31 +0000
csiph-web