On 19 September 2015 10:48:17 BST, Lester Caine <les...@lsces.co.uk> wrote:
>I get that a lot of people think that the only way forward with PHP is
>fully typed, strict checking and blocking anything that may be deemed
>to
>be risky. However PHP7 has not yet dropped the simple object-less style
>of programming that it originally developed from. That is why tidying
>up
>a simple procedural style of working still has a place. The debate on
>'exists()' or to give it a tidier title 'variable_exists()' is more
>about just how much of a procedural style of programming remains in PHP
>in the future.

I agree with the sentiment, but I'm not sure "procedural" is the right keyword 
here. I know of no other language, however procedural, that allows easy 
examination of the local symbol table to see if a variable exists. Nor do most 
procedural languages allow "variable variables" and functionality like 
extract() and compact(). However, I take the point that, whatever name we give 
it, this is a style of coding PHP goes some way to supporting, and there's no  
fundamental reason not to expand that support.

The main risk with a multi-paradigm language is it becoming "Jack of all 
trades, master of none", either because the features themselves are 
sub-standard, or because people use features designed for one style of coding 
as stand-ins for other styles. e.g. mixing variable variables and object 
composition is likely to lead to some confusion.

Regards,
-- 
Rowan Collins
[IMSoP]

Reply via email to