Re: substr/array_slice in []

From: Date: Tue, 09 Oct 2007 10:27:20 +0000
Subject: Re: substr/array_slice in []
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-32714@lists.php.net to get a copy of this message
Sure it works fine when it's been in the language for several years and it's guaranteed to be available in the version provided by your hosting company. In reality this isn't the case with PHP so everyone will end up using the older method to support backwards compatibility or mixing it and causing confusion. Scott Stefan Walk wrote: > Antony Dovgal wrote: >> Right, so let's force other people to learn crappy unreadable syntax >> duplicating nice and clear function call > Oddly, this "crappy unreadable syntax" doesn't lead to any confusion or > complaints for newbies of languages like python or ruby, judging from > the IRC channels. And it's also odd that ruby users, where String#[] is > just an alias for String#slice, prefer this "crappy unreadable syntax" > over a "nice and clear" method call. One starts to wonder ... > > Regards, > Stefan >

« previous php.internals (#32714) next »