Hall of Famer Posted December 28, 2012 Author Share Posted December 28, 2012 (edited) Thank for the support then. XD Yeah, lets take a break from the general auto-import feature. Anyone here actually disagree that built-in classes should be auto-imported? I mean, dont you get tired of having to remind yourself of writing a backslash in front of the class names such as ArrayObject and Exception? Even if you dont think its a problem that many programmers end up getting errors for forgetting to put this backslash, its just way too inconvenient and ugly. Edited December 28, 2012 by Hall of Famer Quote Link to comment Share on other sites More sharing options...
Maq Posted December 28, 2012 Share Posted December 28, 2012 Use a decent IDE that automatically imports only the used classes, then .* is longer longer a concern. Quote Link to comment Share on other sites More sharing options...
trq Posted December 28, 2012 Share Posted December 28, 2012 Thank for the support then. XD Yeah, lets take a break from the general auto-import feature. Anyone here actually disagree that built-in classes should be auto-imported? I mean, dont you get tired of having to remind yourself of writing a backslash in front of the class names such as ArrayObject and Exception? Even if you dont think its a problem that many programmers end up getting errors for forgetting to put this backslash, its just way too inconvenient and ugly. It's just a non-issue IMO. Who really cares? It's one character and is part of the language. Learn to use it, and get on with things. Quote Link to comment Share on other sites More sharing options...
Hall of Famer Posted December 29, 2012 Author Share Posted December 29, 2012 It's just a non-issue IMO. Who really cares? It's one character and is part of the language. Learn to use it, and get on with things. So we should get used to PHP being purely procedural and stop requesting for object oriented features back in the 90s, 'cause its 'part of the language'? Quote Link to comment Share on other sites More sharing options...
Andy-H Posted December 29, 2012 Share Posted December 29, 2012 I think autoloading makes this feature redundant, take kicken's example, is it really that much of a burden to have to type 5 more characters to make your code far more self-explanatory and easier to debug? Not to mention that you're only loading the classes that you actually use... As for Exception and ArrayObject, couldn't you just: use \Exception as Exception; use \ArrayObject as ArrayObject; I can't test this as I'm on my Dad's laptop which doesn't have PHP installed, but it should work? No, you only have to write one line like this: use \Model\User; Then when you use those classes, do: new User\Member or new User\Admin Quote Link to comment Share on other sites More sharing options...
trq Posted December 29, 2012 Share Posted December 29, 2012 So we should get used to PHP being purely procedural and stop requesting for object oriented features back in the 90s, 'cause its 'part of the language'? It is comments like these that make your opinions less and less respectable. Quote Link to comment Share on other sites More sharing options...
Hall of Famer Posted December 29, 2012 Author Share Posted December 29, 2012 (edited) I think autoloading makes this feature redundant, take kicken's example, is it really that much of a burden to have to type 5 more characters to make your code far more self-explanatory and easier to debug? Not to mention that you're only loading the classes that you actually use... As for Exception and ArrayObject, couldn't you just: use \Exception as Exception; use \ArrayObject as ArrayObject; I can't test this as I'm on my Dad's laptop which doesn't have PHP installed, but it should work? Yes it does work, but PHP has more than just Exception and ArrayObject in their built-in class library. Do you want to import them all manually? If so, write 20-30 lines of code that look completely the same in every script file. It is comments like these that make your opinions less and less respectable. How so? I see no difference between your post and mine. 'Its part of the language, PHP isnt Java/C#, you have to get used to it'. Gotta love this kind of quote. Edited December 29, 2012 by Hall of Famer Quote Link to comment Share on other sites More sharing options...
trq Posted December 29, 2012 Share Posted December 29, 2012 How so? It illustrates a general lack of understanding. Quote Link to comment Share on other sites More sharing options...
Hall of Famer Posted December 30, 2012 Author Share Posted December 30, 2012 [/font][/color] It illustrates a general lack of understanding. Nope, not at all. It is the shallowness of your comment that triggered my reply. Yes, lets just stop developing PHP and make PHP 5.5 its final version already. Why keep requesting new features? Whatever we have now is part of the language, lets get used to it and get on with things. Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted December 30, 2012 Share Posted December 30, 2012 Yes, lets just stop developing PHP and make PHP 5.5 its final version already. Why keep requesting new features? Have you actually taken part in the development process? Or made RFCs? Because wishcasting here isn't 'developing PHP' nor is it officially requesting new features. We're not tied to Zend. That's why we're generally amused/bemused at your quest to make PHP better. Writing posts here isn't actually accomplishing any of that. Quote Link to comment Share on other sites More sharing options...
Hall of Famer Posted December 31, 2012 Author Share Posted December 31, 2012 Of course I am not expecting people from this forum to engage in PHP's development process. Its a board where everyone can freely speak his opinion, and I have a point to discuss about PHP's lacking features that need to be improved. Its a matter of point, not a request to make something happen. Quote Link to comment Share on other sites More sharing options...
KevinM1 Posted December 31, 2012 Share Posted December 31, 2012 Which is fine, and believe me, we don't want to stifle discussion. It's just that, after having the same discussion over and over, we tend to get a bit annoyed with how masturbatory it all is. I mean, if you put in the same effort and passion that you put into your posts here in a RFC, you might actually be able to steer PHP in the direction you want. Which is pretty cool. I dunno... it seems like if this is the part that you're most passionate about (and, looking at your post history, it seems like it), then why not harness that passion into something tangible? Why waste time trying to convince us when you can actually convince the powers that be? Again, not saying that you can't, or don't have the right to talk about it here. Just pointing out that you can actually have a hand in the changes you want to see materialize, if you so choose. That's the beauty of open source. You don't need to be on the sidelines. Quote Link to comment Share on other sites More sharing options...
salathe Posted December 31, 2012 Share Posted December 31, 2012 Before allowing anything like wildcards or "importing" entire namespaces, I'd like to see namespaces implemented more as black boxes (e.g. namespace-scoped variables and such like). Currently they are essentially used as class/function/constant name aliases. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.