Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Thu, Sep 18, 2008 at 9:25 PM, Jordan Moore [EMAIL PROTECTED] wrote: On Thu, Sep 18, 2008 at 11:06 AM, Brian Moon [EMAIL PROTECTED] wrote: mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php I'm unsure how the parser works, so ignoring those potential issues, this change would... 1. Break every single PHP script that is currently in existence. maybe an legacy mode can be included in ini 2. Break syntax highlighting (and probably other tools/functions) for every IDE that is currently in existence. this can be fixed by each ide , I talk about something like I'm not sure that much more needs to be said. I can give another practical example in wxjscript from this javascript example that can be run on apache server you can see that is simpler to read and to learn at least for an beginner http://www.wxjavascript.net/mysql/index.html What i want to say is that php must go forward and yes you can change/break things in the engine like in the php 4 to php 5 migration or php5 to php6 In time maybe an fast javascript engine could replace php if it doesn't change in the right direction or it goes to java bloatware way -- Jordan Ryan Moore -- developer flamerobin.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
marius popa wrote: 1. Break every single PHP script that is currently in existence. maybe an legacy mode can be included in ini we want less of such legacy mode options, not more plus this would have to be configured per application and not just per server 2. Break syntax highlighting (and probably other tools/functions) for every IDE that is currently in existence. this can be fixed by each ide , I talk about something like sure it can be fixed, but you missed the *every* part plus IDEs, editors, highlight tools etc. would have to support both old and new for quite a while I'm not sure that much more needs to be said. I can give another practical example in wxjscript from this javascript example that can be run on apache server you can see that is simpler to read and to learn at least for an beginner http://www.wxjavascript.net/mysql/index.html so instead of clearly marking variables with $ as such there they need to be declared with 'var' instead, and '-' is replaced by '.' ... ... i don't see much of a difference there from a learning point of view though What i want to say is that php must go forward and yes you can change/break things in the engine like in the php 4 to php 5 migration or php5 to php6 sure we can break things if there is a compelling reason to do so, i'm just totally missing the compelling part here ... -- Hartmut Holzgraefe, MySQL Regional Support Manager EMEA Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
sure we can break things if there is a compelling reason to do so, i'm just totally missing the compelling part here ... This is not going to happen. This thread is over. -- Slan, David -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Since these are all valid requests (I really enjoyed the euro sign one), I'd suggest to import some ideas from Fortran and Python. The first request is to remove the ; sign. It's annoying and everyone here knows it. =) My second request is is column identing. PHP should support = assignment if defined in column 0, example: ?php $foo value // equivalent to $foo = value; nowadays And since we may have to deal with other interesting situations (like +=, -=, etc), you should put the sign before left expression + $foo value // which means $foo += value; The idea should be followed for: 0 equivalent to = assignment 1 equivalent to method or function call 2 function or method definition 3 normal code 4 loop ... The idea is very simple and imagine this source that currently works: class Foo { public static function bar() { $str = ''; for ($i = 0, $l = 10; $i $l; $i++) { $str += '[' . $i . ']'; } return $str; } } Will be simplified a lot into (and also include the euro sign suggestion): class Foo static bar() €str '' €i = 0, €l = 10; €i €l; €i++ + €str '[' . €i . ']' return €str Of course this is just a RFC and we should start endless discussions to define new terminals in grammar, but I would love to see that into PHP 7 Cheers, On Fri, Sep 19, 2008 at 7:47 PM, Marcus Boerger [EMAIL PROTECTED] wrote: Hello Ionut, a Friend suggested to replace it with a Euro sign, so that PHP code gets worth more :-) marcus Thursday, September 18, 2008, 8:30:37 PM, you wrote: Actually, I somehow understand what he wants, considering we'll soon have lambdas and closures. I mean, in case of javascript a variable can hold as well a function as it can hold anything else. Anyway, I don't think this is the case for PHP. I do find it ugly to write $function(), but I guess I'll live with it as I did until now. Cheers, I. Stan - Original Message From: Brian Moon [EMAIL PROTECTED] To: mike [EMAIL PROTECTED] Cc: marius popa [EMAIL PROTECTED]; internals@lists.php.net Sent: Thursday, September 18, 2008 9:06:11 PM Subject: Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: [EMAIL PROTECTED] URL: http://blog.bisna.com Rio de Janeiro - RJ/Brazil
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Marcus Boerger kirjoitti: Hello Ionut, a Friend suggested to replace it with a Euro sign, so that PHP code gets worth more :-) Hey, why not make it configurable (ini option) ?! :D --Jani marcus Thursday, September 18, 2008, 8:30:37 PM, you wrote: Actually, I somehow understand what he wants, considering we'll soon have lambdas and closures. I mean, in case of javascript a variable can hold as well a function as it can hold anything else. Anyway, I don't think this is the case for PHP. I do find it ugly to write $function(), but I guess I'll live with it as I did until now. Cheers, I. Stan - Original Message From: Brian Moon [EMAIL PROTECTED] To: mike [EMAIL PROTECTED] Cc: marius popa [EMAIL PROTECTED]; internals@lists.php.net Sent: Thursday, September 18, 2008 9:06:11 PM Subject: Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Sat, Sep 20, 2008 at 06:35:25PM +0300, Sotiris Karavarsamis wrote: On Sat, 20 Sep 2008 16:43:52 +0300, Jani Taskinen [EMAIL PROTECTED] wrote: Marcus Boerger kirjoitti: Hello Ionut, a Friend suggested to replace it with a Euro sign, so that PHP code gets worth more :-) Hey, why not make it configurable (ini option) ?! :D I really do not find it reasonable to change the dollar sign to something else. If we could switch the dollar sign notation in variables on and off with a directive in php.ini, that would break backwards compatibility between apps not only in a single user environments but also in shared hosting envs. Imagine having to switch into dollar sign notation for a phpbb installation and to a notation without the dollar sign for a custom application. It's just crazy! I doubt that that was a serious suggestion. Just a joke. Although I do like the idea of replacing dollar with euro :-) -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http://www.ukuug.org/ #include std_disclaimer.h -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Hey, why not make it configurable (ini option) ?! :D I really do not find it reasonable to change the dollar sign to something else. If we could switch the dollar sign notation in variables on and off with a directive in php.ini, that would break backwards compatibility between apps not only in a single user environments but also in shared hosting envs. Imagine having to switch into dollar sign notation for a phpbb installation and to a notation without the dollar sign for a custom application. It's just crazy! http://en.wikipedia.org/wiki/Sarcasm ... I hope :-D Regards Marco
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Marco wrote: So don't you consider this a serious reason against stripping/changing the dollar sign? Do you think that would be a good effect for PHP users if that change would exist in a future version of PHP (even in PHP6!)? It's a simple change but a great shift! Hey, why not make it configurable (ini option) ?! :D I really do not find it reasonable to change the dollar sign to something else. If we could switch the dollar sign notation in variables on and off with a directive in php.ini, that would break backwards compatibility between apps not only in a single user environments but also in shared hosting envs. Imagine having to switch into dollar sign notation for a phpbb installation and to a notation without the dollar sign for a custom application. It's just crazy! http://en.wikipedia.org/wiki/Sarcasm ... I hope :-D I'm not being sarcastic, if you mean it. :p Regards Marco -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
@sotiris: explain me how will does this be handled: $array_pop = 'foo'; $test = $array_pop($arrayFoo); // $test = foo($arrayFoo); if you remove the $ array_pop = 'foo'; test = array_pop(arrayFoo); // huh?!?!?! Cheers, On Sat, Sep 20, 2008 at 2:59 PM, sotiris karavarsamis [EMAIL PROTECTED] wrote: Marco wrote: So don't you consider this a serious reason against stripping/changing the dollar sign? Do you think that would be a good effect for PHP users if that change would exist in a future version of PHP (even in PHP6!)? It's a simple change but a great shift! Hey, why not make it configurable (ini option) ?! :D I really do not find it reasonable to change the dollar sign to something else. If we could switch the dollar sign notation in variables on and off with a directive in php.ini, that would break backwards compatibility between apps not only in a single user environments but also in shared hosting envs. Imagine having to switch into dollar sign notation for a phpbb installation and to a notation without the dollar sign for a custom application. It's just crazy! http://en.wikipedia.org/wiki/Sarcasm ... I hope :-D I'm not being sarcastic, if you mean it. :p Regards Marco -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- Guilherme Blanco - Web Developer CBC - Certified Bindows Consultant Cell Phone: +55 (16) 9166-6902 MSN: [EMAIL PROTECTED] URL: http://blog.bisna.com Rio de Janeiro - RJ/Brazil -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Please stop this useless thread, it's wasting everybody's time. regards, Derick -- HEAD before 5_3!: http://tinyurl.com/6d2esb http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Guilherme Blanco wrote: @sotiris: explain me how will does this be handled: $array_pop = 'foo'; $test = $array_pop($arrayFoo); // $test = foo($arrayFoo); if you remove the $ array_pop = 'foo'; test = array_pop(arrayFoo); // huh?!?!?! Guilherme, I suggest keeping the $ sign in the syntax scheme of PHP; that is clear in my prior responses. Why do you actually ask this? Changing the way variables are denoted by stripping the dollar sign obviously breaks previous syntax functionality offered by PHP (indirect function calls through variables). Cheers, On Sat, Sep 20, 2008 at 2:59 PM, sotiris karavarsamis [EMAIL PROTECTED] wrote: Marco wrote: So don't you consider this a serious reason against stripping/changing the dollar sign? Do you think that would be a good effect for PHP users if that change would exist in a future version of PHP (even in PHP6!)? It's a simple change but a great shift! Hey, why not make it configurable (ini option) ?! :D I really do not find it reasonable to change the dollar sign to something else. If we could switch the dollar sign notation in variables on and off with a directive in php.ini, that would break backwards compatibility between apps not only in a single user environments but also in shared hosting envs. Imagine having to switch into dollar sign notation for a phpbb installation and to a notation without the dollar sign for a custom application. It's just crazy! http://en.wikipedia.org/wiki/Sarcasm ... I hope :-D I'm not being sarcastic, if you mean it. :p Regards Marco -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Apropos of nothing, if you are all looking for something to reclaim, then how about dropping # as a comment. We've got block and single line comments already with /* */ and //. Then # could be the namespace separator and solve all these issues about conflicts between namespace::function and class::static. namespace#function() is very much distinguishable to class::static() Richard. -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Finally something that makes sense or at least worthy of discussion!! But not at this thread. Cheers, On Sat, Sep 20, 2008 at 6:15 PM, Richard Quadling [EMAIL PROTECTED]wrote: Apropos of nothing, if you are all looking for something to reclaim, then how about dropping # as a comment. We've got block and single line comments already with /* */ and //. Then # could be the namespace separator and solve all these issues about conflicts between namespace::function and class::static. namespace#function() is very much distinguishable to class::static() Richard. -- - Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498r=213474731 Standing on the shoulders of some very clever giants! -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- Diego www.dnfeitosa.com
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Thu, Sep 18, 2008 at 16:47, marius popa [EMAIL PROTECTED] wrote: I was looking at the examples used in php.js library http://phpjs.org/functions/index and it struck me that is cleaner to read the functions and code without the $ names in it From what i understand $ in front of variables is an Perl legacy I totally agree. Its really annoying needing to type $ all the time, not to mention how hard it is on Norwegian keyboards. Lets replace it with £ ! There is even a patch available: http://php.markmail.org/message/jsex75rowudeu2nr -Hannes -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Fri, Sep 19, 2008 at 10:50 AM, Hannes Magnusson [EMAIL PROTECTED] wrote: I totally agree. Its really annoying needing to type $ all the time, not to mention how hard it is on Norwegian keyboards. Lets replace it with £ ! There is even a patch available: http://php.markmail.org/message/jsex75rowudeu2nr £ is just as hard. Let's replace it with the international currency-symbol ¤ (Yes, that's what that weird symbol for, in case you've always wondered about it). -- troels -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Alain Williams wrote: On Thu, Sep 18, 2008 at 11:30:37AM -0700, Ionut Gabriel Stan wrote: Actually, I somehow understand what he wants, considering we'll soon have lambdas and closures. I mean, in case of javascript a variable can hold as well a function as it can hold anything else. Anyway, I don't think this is the case for PHP. I do find it ugly to write $function(), but I guess I'll live with it as I did until now. So if you drop the '$' the way that you call a function referenced in variable 'funref' is not: $funref() but funref() However: the PHP parser will take that to be a call to a function named 'funref'. So you need to change the syntax to, perhaps, something like C: (funref)() I can't see people understanding that. Stick with what we have. There is no difference between a function and a variable which holds a closure in many languages (e.q. JavaScript, LUA, ...), so you don't need any extra syntax rules. function foo() { } foo(); var bar = function() { } bar(); It's not possible to make the same unification with PHP's $, however I don't see a way to remove $. Thanks. Dmitry. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Hannes Magnusson wrote: I totally agree. Its really annoying needing to type $ all the time, not to mention how hard it is on Norwegian keyboards. Lets replace it with £ ! Like most programming languages PHP is optimized for American keyboard layout, deal with it! Fx. I especially like the placement of the MySQL escape character ` on Nordic keyboards: press Alt-gr and |, release them and then press space. There is even a patch available: http://php.markmail.org/message/jsex75rowudeu2nr Way to go, lets make a port of all major programming languages, to all keyboard layouts. ;-) -- Best regards Asbjørn Sloth Tønnesen -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Asbjørn Sloth Tønnesen wrote: Hannes Magnusson wrote: I totally agree. Its really annoying needing to type $ all the time, not to mention how hard it is on Norwegian keyboards. Lets replace it with £ ! Like most programming languages PHP is optimized for American keyboard layout, deal with it! Fx. I especially like the placement of the MySQL escape character ` on Nordic keyboards: press Alt-gr and |, release them and then press space. There is even a patch available: http://php.markmail.org/message/jsex75rowudeu2nr Way to go, lets make a port of all major programming languages, to all keyboard layouts. ;-) Those of use who use non-latin based languages in a better position - need to learn a new layout, the US one. Even in Bulgaria althought there is a national standard for a keyboard layout second one emerged during the years which is based on a transliteration of QWERTY. However, using the QWERTY layout one is slower compared to the case when using the national standard. OTOH, layout switching is pretty easy nowadays, you might install a qwerty layout for programming (/me has nowadays US, DE and BG installed to handle all the communities I am involved in :) Best, Andrey -- Andrey Hristov, Connectors Software Developer, Database Group Sun Microsystems GmbH, Sonnenallee 1, 85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Fri, Sep 19, 2008 at 1:50 AM, Hannes Magnusson [EMAIL PROTECTED] wrote: I totally agree. Its really annoying needing to type $ all the time, not to mention how hard it is on Norwegian keyboards. Lets replace it with £ ! can we make PHP whitespace dependent too? might as well. :) note: i am absolutely NOT actually requesting this.
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Hello Ionut, a Friend suggested to replace it with a Euro sign, so that PHP code gets worth more :-) marcus Thursday, September 18, 2008, 8:30:37 PM, you wrote: Actually, I somehow understand what he wants, considering we'll soon have lambdas and closures. I mean, in case of javascript a variable can hold as well a function as it can hold anything else. Anyway, I don't think this is the case for PHP. I do find it ugly to write $function(), but I guess I'll live with it as I did until now. Cheers, I. Stan - Original Message From: Brian Moon [EMAIL PROTECTED] To: mike [EMAIL PROTECTED] Cc: marius popa [EMAIL PROTECTED]; internals@lists.php.net Sent: Thursday, September 18, 2008 9:06:11 PM Subject: Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DEV] php7- dropping the $ from the variable name - rfc
I was looking at the examples used in php.js library http://phpjs.org/functions/index and it struck me that is cleaner to read the functions and code without the $ names in it From what i understand $ in front of variables is an Perl legacy -- developer flamerobin.org
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
marius popa wrote: I was looking at the examples used in php.js library http://phpjs.org/functions/index and it struck me that is cleaner to read the functions and code without the $ names in it From what i understand $ in front of variables is an Perl legacy And how do you propose to do string interpolation? echo This is a $var in a string; or: echo EOB This is a $var in a heredoc EOB; This is the heart and soul of PHP which isn't possible without a way to identify a variable. I suppose you could argue that you would have two ways to indicate a variable, $var for interpolation and var without, but that gets even messier. One consistent way is cleaner. -Rasmus -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On 18.09.2008, at 16:58, Rasmus Lerdorf wrote: And how do you propose to do string interpolation? You could do it using an interpolation operator in String constants. echo This is a #{var} in a string.; /* Ruby does it using this */ But why break compatibility for a purely aesthetical problem? Kris -- Kristian Köhntopp https://www.xing.com/profile/Kristian_Koehntopp http://blog.koehntopp.de -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Thu, Sep 18, 2008 at 7:47 AM, marius popa [EMAIL PROTECTED] wrote: I was looking at the examples used in php.js library http://phpjs.org/functions/index and it struck me that is cleaner to read the functions and code without the $ names in it From what i understand $ in front of variables is an Perl legacy This is an utterly horrible idea. No offense. Why would you change the entire syntax of the language? I don't think any language has -ever- changed it's syntax like that once it's been established... Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Thu, Sep 18, 2008 at 11:06 AM, Brian Moon [EMAIL PROTECTED] wrote: mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php I'm unsure how the parser works, so ignoring those potential issues, this change would... 1. Break every single PHP script that is currently in existence. 2. Break syntax highlighting (and probably other tools/functions) for every IDE that is currently in existence. I'm not sure that much more needs to be said. -- Jordan Ryan Moore -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Actually, I somehow understand what he wants, considering we'll soon have lambdas and closures. I mean, in case of javascript a variable can hold as well a function as it can hold anything else. Anyway, I don't think this is the case for PHP. I do find it ugly to write $function(), but I guess I'll live with it as I did until now. Cheers, I. Stan - Original Message From: Brian Moon [EMAIL PROTECTED] To: mike [EMAIL PROTECTED] Cc: marius popa [EMAIL PROTECTED]; internals@lists.php.net Sent: Thursday, September 18, 2008 9:06:11 PM Subject: Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
mike wrote: ... Would you mind using your full name or something else? Thanks :) Not that I'd have a (tm) on mike, but anyway... Cheers, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Thu, Sep 18, 2008 at 11:52 AM, Michael Wallner [EMAIL PROTECTED] wrote: Would you mind using your full name or something else? Thanks :) Not that I'd have a (tm) on mike, but anyway... i have to give props to you having [EMAIL PROTECTED], but as of right now i am not ready to make the official change on my name yet :) i don't really post to internals often so you probably won't see much of me anyway :) -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
Well, you can do that right now, PHP supports that for ages. ?php $myVar = 'print'; $myVar('Hello!'); // Outputs hello ? So lamdas realy do not change anything in this context. What they do is make our life easier by making us able to live without create_function(). Anyway, removing $ is bad and people gave plenty of points for that. Here is summary: 1). Break every application. 2). Break highlight. 3). Make almost imposible for parser to replace variables with their contents in and HEREDOC constructions. Well, it can be done, but it will make a huge slowdown and memory usage. 4). Adding $ before variable doesn't take any time for any experienced in PHP developer 5). Variables are seen clearly in code. 6). Hey, you can use $ in JS too! It just works! :) 2008/9/18 Ionut Gabriel Stan [EMAIL PROTECTED] Actually, I somehow understand what he wants, considering we'll soon have lambdas and closures. I mean, in case of javascript a variable can hold as well a function as it can hold anything else. Anyway, I don't think this is the case for PHP. I do find it ugly to write $function(), but I guess I'll live with it as I did until now. Cheers, I. Stan - Original Message From: Brian Moon [EMAIL PROTECTED] To: mike [EMAIL PROTECTED] Cc: marius popa [EMAIL PROTECTED]; internals@lists.php.net Sent: Thursday, September 18, 2008 9:06:11 PM Subject: Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc mike wrote: Personally I love the $. It makes it so much easier to identify variables. It's a single character. Can't see the need honestly to even bring this up. +1,000,000. Horrible idea. *facepalm* -- Brian Moon Senior Web Engineer -- When you care enough to spend the very least. http://dealnews.com/ -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Thu, Sep 18, 2008 at 11:30:37AM -0700, Ionut Gabriel Stan wrote: Actually, I somehow understand what he wants, considering we'll soon have lambdas and closures. I mean, in case of javascript a variable can hold as well a function as it can hold anything else. Anyway, I don't think this is the case for PHP. I do find it ugly to write $function(), but I guess I'll live with it as I did until now. So if you drop the '$' the way that you call a function referenced in variable 'funref' is not: $funref() but funref() However: the PHP parser will take that to be a call to a function named 'funref'. So you need to change the syntax to, perhaps, something like C: (funref)() I can't see people understanding that. Stick with what we have. -- Alain Williams Linux Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer. +44 (0) 787 668 0256 http://www.phcomp.co.uk/ Parliament Hill Computers Ltd. Registration Information: http://www.phcomp.co.uk/contact.php Chairman of UKUUG: http://www.ukuug.org/ #include std_disclaimer.h -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Thu, Sep 18, 2008 at 9:09 PM, Arvids Godjuks [EMAIL PROTECTED] wrote: Well, you can do that right now, PHP supports that for ages. ?php $myVar = 'print'; $myVar('Hello!'); // Outputs hello ? Partly because I can't resist being smug, partly because it might confuse someone, I have to point out that that example won't work, because pint isn't a function. It would work with most everything else though. -- troels -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DEV] php7- dropping the $ from the variable name - rfc
On Thu, Sep 18, 2008 at 12:25 PM, troels knak-nielsen [EMAIL PROTECTED] wrote: On Thu, Sep 18, 2008 at 9:09 PM, Arvids Godjuks [EMAIL PROTECTED] wrote: Well, you can do that right now, PHP supports that for ages. ?php $myVar = 'print'; $myVar('Hello!'); // Outputs hello ? Partly because I can't resist being smug, partly because it might confuse someone, I have to point out that that example won't work, because pint isn't a function. It would work with most everything else though. -- troels -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php You're right, pint isn't a function, and neither is print. ;) -- Jordan Ryan Moore -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php