Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:32715 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 55910 invoked by uid 1010); 9 Oct 2007 10:47:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 55895 invoked from network); 9 Oct 2007 10:47:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 9 Oct 2007 10:47:22 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 72.14.204.233 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 72.14.204.233 qb-out-0506.google.com Received: from [72.14.204.233] ([72.14.204.233:13947] helo=qb-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AD/EC-04247-93C5B074 for ; Tue, 09 Oct 2007 06:47:21 -0400 Received: by qb-out-0506.google.com with SMTP id e11so1083582qbe for ; Tue, 09 Oct 2007 03:47:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Yg4uKaQopS7Llua2mR05VSRD2Dx0wsOZTsGlftEgd8E=; b=Mm/zBYAxSFtHRgqYDfCdR1m0cbA5ZkH9ajW05yZ0vJhWx8yRtx12xMLyrEh69U3IqAwGMugIu38qLfXgPwRme88O0YZQNuW+I8qVyd6OOM/BQKNubHFDgW5UQT+42VsyqFCugMYOPnxM4aJvmTjAuz2YyeQ+iwyaSRUMN45fujM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=lCSWzQ7+nGV67Y9DHF09ktALVsaZOXFKzcekHEFntehSlO5cWWkJf+D0iKyuT++Ahld/LkYeova9LO4txTKQiJ8yziNIve8pqAVNw0LTL+ooITo189KqJs6YugBI5G5y8mjPobHIW2gWuCnISBD4llS7uZ9ZYjxv40j/jloUlXU= Received: by 10.114.150.1 with SMTP id x1mr7058542wad.1191926838085; Tue, 09 Oct 2007 03:47:18 -0700 (PDT) Received: by 10.115.59.1 with HTTP; Tue, 9 Oct 2007 03:47:18 -0700 (PDT) Message-ID: <10845a340710090347g13cc7a37x1d16c81d7851537@mail.gmail.com> Date: Tue, 9 Oct 2007 11:47:18 +0100 Reply-To: RQuadling@GoogleMail.com To: "Scott MacVicar" Cc: "Stefan Walk" , "Antony Dovgal" , "Ford, Mike" , internals@lists.php.net In-Reply-To: <470B5788.3090100@macvicar.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <93ED589E60BA254F97435FE6C97F2C672DE125@leedsmet-exch1.leedsmet.ac.uk> <470B45E1.1030403@daylessday.org> <470B4E32.2020703@physik.tu-darmstadt.de> <470B5788.3090100@macvicar.net> Subject: Re: [PHP-DEV] substr/array_slice in [] From: rquadling@googlemail.com ("Richard Quadling") On 09/10/2007, Scott MacVicar wrote: > 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 OOI. If the ISP is not on the version which would have this particular "feature", how would I create a fallback solution for my clients? Something like PEAR's PHP Compat library. Very useful for giving support to newer functionality. I think I wouldn't bother with the new feature for a while. Maybe if it was major version only (V5 vs V6 is nice and clean, but V5.2.4 vs V5.2.5 is not so easy for some clients to understand that new functionality - rather than bug fixes - requires an upgrade). But having a working method already seems redundant, simply for syntactic sugar. > > 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 -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"