You are here: Re: Butt ugly « PHP Programming Language « IT news, forums, messages
Re: Butt ugly

Posted by Rik on 05/29/06 03:46

Norman Peelman wrote:
> The bottom line is that '.' and '+' are/were not really meant to be
> used at the same time as one works with strings and one works with
> mathematics. So normally there would be no ambiguity. Type casting
> 'allows' it to be done so that someone who has an understanding of
> what's going on can proceed without having to use/write functions to
> convert strings and numbers back and forth.

I think that's the major point here:
typecasting vs. clear operations

One excludes the other in may occasions. PHP is very forgiving, allowing
floats, expontentials etc, but eval()ing strings using some mathmetical
parser before mathmatical equasions is to much to ask.

If one wants a pure, clear language, the parser should break at the
operations stated eralier, issuing a warning that 'something' isn't an
number (float, integer etc.), or 'something' isn't a string.

That would have a purity I can appreciate, allthough always casting posted,
get, database queried, filtered, or however one gets data, to a number will
be such a big pain, I do think PHP has it right with introducing some
leniency. The distance that leniency goes is the programmers responsibility
to learn, the consequences of that leniency are the programmers choice.

Grtz,
--
Rik Wasmus

 

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

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