Re: [OT] Choosing a scripting language.
От | Michael Teter |
---|---|
Тема | Re: [OT] Choosing a scripting language. |
Дата | |
Msg-id | 3F9B76A8.5030907@1scom.net обсуждение исходный текст |
Ответ на | Re: [OT] Choosing a scripting language. (Marco Colombo <marco@esi.it>) |
Список | pgsql-general |
I'm a big fan of Python, and the indentation doesn't bother me, but I do miss brace matching in Vi. % % was so handy for hopping thru code or checking blocks. Marco Colombo wrote: > On Fri, 24 Oct 2003, scott.marlowe wrote: > >>On Fri, 24 Oct 2003, Scott Chapman wrote: > > [...] > >>>I also love the indentation to >>>differentiate code blocks rather than the junk I'd been used to seeing in >>>Perl and previous languages. >> >>Sorry, that was the one big turnoff for me in Python. Indentation is >>simple to me, I do it linux kernel style, and don't even have to pay >>attention to it anymore, it's just automatic for me. I guess I'm just >>used to doing it the old fashioned way. > > > I don't get it. If you already indent code, what's the problem with > Python? Python _requires_ correct indentation, so it's a problem only > to beginners who don't like indenting (and forces them in doing > the Right Thing). If indentation is automatic for you, you're already > doing it the Python way. > Enforcing correct indentation is not more a burden than enforcing > braces matching (or BEGIN/END): it's just syntax, and comes natural > to most experienced programmers. Python codes is just prettier to > the eyes (and thus, to the mind), just because it's simpler w/o > braces and semicolons (any UNIX/C programmer already has an internal > background parser for that, I know). > > BTW, I do 80% of my scripting in PHP (started with PHP/FI), 10% in perl > (perl4) and 10% in python (1.5). PHP is usually web-oriented (but > use php -f sometimes, expecially for cron scripts that share code > with CGI ones). Perl is unbeatable in quick&dirty processing scripts > (Perl can be both _very_ quick and _very_ dirty), Pyhton for anything > bigger and well-designed (and with a GUI). All three should have > a place in your toolbox, and you should use the right tool for the > right task. The same applies to PostgreSQL. I'd never use it as > permanent storage for my Perl hashes or Python dictionaries: old-style > NDBM/Berkeley DB will do (and do well) most of the times. > > Don't go with one scripting language, learn them all. Even tcl will teach > you something (not much, I admit). > > .TM.
В списке pgsql-general по дате отправления: