Re: [OT] Choosing a scripting language.
От | Marco Colombo |
---|---|
Тема | Re: [OT] Choosing a scripting language. |
Дата | |
Msg-id | Pine.LNX.4.44.0310251759220.23308-100000@Megathlon.ESI обсуждение исходный текст |
Ответ на | Re: [OT] Choosing a scripting language. ("scott.marlowe" <scott.marlowe@ihs.com>) |
Ответы |
Re: [OT] Choosing a scripting language.
Re: [OT] Choosing a scripting language. |
Список | pgsql-general |
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. -- ____/ ____/ / / / / Marco Colombo ___/ ___ / / Technical Manager / / / ESI s.r.l. _____/ _____/ _/ Colombo@ESI.it
В списке pgsql-general по дате отправления: