You are here: Re: Assigning variables in if's « PHP Programming Language « IT news, forums, messages
Re: Assigning variables in if's

Posted by Jerry Stuckle on 11/29/07 17:04

Gordon wrote:
> On Nov 29, 1:22 pm, Toby A Inkster <usenet200...@tobyinkster.co.uk>
> wrote:
>> taps128 wrote:
>>> or more readable(to me)
>> Readable perhaps, but boring. echo (true === ($err = somefunc())) ? 'ok' :
>> "error: $err"; is fun. It invites the reader to explore its mysteries; to
>> embark in a journey of discovery, a quest filled with a sense of awe and
>> wonder. And in a sense it helps the reader to uncover new things about
>> *themselves* and unfold the secrets of their very souls.
>>
>> Plus it saves almost 30 bytes.
>>
>> --
>> Toby A Inkster BSc (Hons) ARCS
>> [Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
>> [OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 4 days, 20:07.]
>> [Now Playing: Keane - On a Day like Today]
>>
>> Sharing Music with Apple iTunes
>> http://tobyinkster.co.uk/blog/2007/11/28/itunes-sharing/
>
> And is completely contrary to the principles of writing maintainable
> code. :) What code does should be self-evident, or at least self-
> explanatory and well commented, because the poor sod who has to look
> at the code in 18 months time to figure out why it's not behaving as
> intended might be you.
>

That is very true, and it depends on who's going to be reading it.

For instance, experienced C/C++ programmers would understand what it's
doing, even if they don't know PHP. However, a Perl programmer would be
more confused.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация