Re: Command line PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 7, 2011 at 12:53 PM, tedd <tedd.sperling@xxxxxxxxx> wrote:

> At 12:16 PM -0700 1/7/11, Nathan Nobbe wrote:
>
>> On Fri, Jan 7, 2011 at 11:54 AM, Joshua Kehn <josh.kehn@xxxxxxxxx> wrote:
>>
>>   Why bother learning other languages? Is this a joke? Why should someone
>>>  stop learning *ever?** *Having a mastery of multiple languages can only
>>>  enhance you.
>>>
>>>
>> No, it's not a joke.  The idea is why bother learning an language that
>> will
>> score you little milage, in the context of the one you already know well.
>>  For example, if I'm a Web developer coding what CLI requirements I have
>> in
>> PHP, then I might venture to learn something like Javascript before ever
>> touching Python.  So yes, having mastery of multiple languages can help
>> you,
>> but it's best when these multiple languages don't overlap as much as PHP
>> and
>> Python.
>>
>> -nathan
>>
>
> nathan:
>
> I have to disagree with you a little-bit about this.
>
> If one knows the languages involved and realize their overlap, then they
> should have a better understanding of which language to use for what
> purpose. For example, which is better for styling CSS or Javascript? Both
> can do it, but one is the clear winner.


agreed, however, if im a skilled js programmer and need some rounded
corners, id probly just grab a library that leverages css to accomplish the
job before sitting down and really learning css.  or perhaps if my sql
skills aren't strong enough, i know i can get the job done w/ some extra
manipulation in php.  one should consider how much time will be spent
solving the current problem, how much time is available before the solution
must ship, and if it's beneficial to learn something entirely new just to
solve it when your current knowledge may provide a sufficient solution.

we're comparing php to bash/python here and frankly id like to know what the
main advantages of those languages over php for cli processing would be ..
marginal at best.  id hazard a guess that python supports threading tho :O

moreover, if i already know php, python is probly one of the last languages
i want to learn unless im considering abandoning php... the thought has
occurred to me >ducks<  id rather spend time learning something that runs
fast like brushing up on java or maybe C or C++, that way i'll get more
mileage for my time as i'll be more versatile with less overlap.  it's like
i could know 2 scripting languages w/ heavy overlap or 1 scripting language,
and one compiled language, that seems better from my perspective.  there are
always merits to knowing a shell language tho, and i've wanted to get
stronger with bash, but python .. i see it more as python OR php.

i worked on an asterisk app one time w/ a php front-end and many of the
asterisk hook scripts were written in bash.  this was a poor choice imo.  #1
we weren't leveraging code from the main app & #2 now i'm looking at running
mysql client through awk on the cli to get args into bash .. ouch.  give me
mysql_query(), lol.  much easier for anyone coming into the biz who knows
php to keep things consistent imo.

much of the gripe comparing php to python over the years is slowly fading
with the advent of new features of php, most notably closures.  once traits
are available im sure the multiple inheritance that python offers will be
less of an advantage over php's single inheritance paradigm.

-nathan

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux