Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53197 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 8864 invoked from network); 8 Jun 2011 08:47:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jun 2011 08:47:59 -0000 Authentication-Results: pb1.pair.com header.from=confik@gmail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=confik@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.161.170 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: confik@gmail.com X-Host-Fingerprint: 209.85.161.170 mail-gx0-f170.google.com Received: from [209.85.161.170] ([209.85.161.170:57050] helo=mail-gx0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 14/F8-50253-E373FED4 for ; Wed, 08 Jun 2011 04:47:59 -0400 Received: by gxk27 with SMTP id 27so113717gxk.29 for ; Wed, 08 Jun 2011 01:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=eHZ5SAGgblwDwE1ZFdgZ1ooVRpOfCwIu82OcPYAbSh0=; b=Xjsqo/+LHQICuEehMkX5ToikszpUA/ZWiZwI2b4mDT//Q2TYB3Va2uBHEyI/nuA8Bf qmGdWEL9lflhF3bPYwlDiFFff8BgDYwFP5dysgQzVrwYFFwsViPZVtvaXxwig4wWR6rI 6eiOeClJdGAVKlpyoEKsAyc2BUtKIoVIEy0W8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=uedhxtVkem+xS92IQpruW/3RCBEZhPownv0TcoaBpJ/ctnATYTMs0WzxzX4u2yH2Vz WapBfoUkQC7IMjcuMY/ZyUCakfXTFTr5IlTiClCgmDu4rzESFKPBE/FMPNIGsNKBeZZE Xa+mcDSUFBtkwVlfDMXh1l8NJehug5couPCnk= Received: by 10.91.169.16 with SMTP id w16mr393455ago.89.1307522875105; Wed, 08 Jun 2011 01:47:55 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.65.1 with HTTP; Wed, 8 Jun 2011 01:47:35 -0700 (PDT) In-Reply-To: References: <4DED3D5B.6030307@oracle.com> <4DEE782E.1020605@sugarcrm.com> <7104F8AD-489E-4824-97AA-D9831FAB77AA@bitextender.com> <4DEE8ABB.8040503@sugarcrm.com> <7E4C6CB6-ED93-4BFC-87B8-94FDEF243896@bitextender.com> <17.29.50253.ACD8EED4@pb1.pair.com> <41.0E.50253.11B9EED4@pb1.pair.com> Date: Wed, 8 Jun 2011 13:47:35 +0500 Message-ID: To: Hannes Magnusson Cc: "Matthew Weier O'Phinney" , internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Callable type From: confik@gmail.com (Alexey Shein) 2011/6/8 Hannes Magnusson : > We have the situation in the docs that parameters declared as arrays > do not follow the typehinting rules, but parameters as class names do. > Re-using the callback from the docs could get confusing when > extensions start to typehint on it, but not the core.. > > I think there is a subtle difference between a callback, and a callable. > In javascript for example, callback is something that is executed on > certain events "onsuccess" is the typical example. > There is nothing that says the callable parameter gets executed as a > part of an event, and I think the default usecase would be to execute > it right away (f.e. filtering data). > > I think I would prefer callable, but I could live with either. > Wikipedia defines callback as "a reference to executable code, or a piece of executable code, that is passed as an argument to other code". So there's no "event" meaning put by default, it's just very often seen callback's usage in javascript. I just like "callback" term more :) -- Regards, Shein Alexey