ID:               27109
 Updated by:       [EMAIL PROTECTED]
-Summary:          [request] magic string concat
 Reported By:      xuefer at 21cn dot com
-Status:           Open
+Status:           Wont fix
 Bug Type:         Feature/Change Request
 Operating System: *
 PHP Version:      5CVS-2004-01-31 (dev)
 New Comment:

We love our dots, it's the language and so it will be. We're not going
to change this.


Previous Comments:
------------------------------------------------------------------------

[2004-01-31 13:33:29] xuefer at 21cn dot com

Description:
------------
as we know, in C/C++, const string will be concat magically
char *str = "FOO" "BAR";

but in php, we used dot '.' to concat, which is widely used as
object.method() method.property in other languages, there isn't much
symbols on our keyboard, this make php have to use $this->foo()
$this->bar for objects
many and many times we type "-" shift + ">" :(

i suggest that php should be able to do:
$hello = "hell" "o";
$hello = $hello " wo"; // same as $hello = $hello . " wo";
$hello .= "rld"; // still, and ever supported

space between expressions means string-concat

$query = "select abc"
 " from table"
 " where ...";

we don't have to:
$query = "select abc"
 . " from table"
 . " where ...";

or:
$query = "select abc" .
 " from table" .
 " where ...";
(hard to modify)

or:
$query = "select abc
  from table
  where ...";
(ugly)

php is for web, web is text, text is string
hope one day all code is written with out using dot concat (.) so we
can deprecate it, and then disabled, and we can $phpers.smile(";)")




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=27109&edit=1

Reply via email to