Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:93467 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42770 invoked from network); 24 May 2016 06:01:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 24 May 2016 06:01:30 -0000 Authentication-Results: pb1.pair.com header.from=inefedor@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=inefedor@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.215.48 as permitted sender) X-PHP-List-Original-Sender: inefedor@gmail.com X-Host-Fingerprint: 209.85.215.48 mail-lf0-f48.google.com Received: from [209.85.215.48] ([209.85.215.48:34576] helo=mail-lf0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 40/E0-37212-93EE3475 for ; Tue, 24 May 2016 02:01:30 -0400 Received: by mail-lf0-f48.google.com with SMTP id k98so2183281lfi.1 for ; Mon, 23 May 2016 23:01:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=to:subject:references:date:mime-version:content-transfer-encoding :from:message-id:in-reply-to:user-agent; bh=9h8HvY0QCiYW4YE1dlXlhHYdHZGbj7xacvvYw2cGE+w=; b=fpB3/+0Ucy8fSaZhKADT9EC++h8dUlEfddYYnYC87RyTZN9I3q6nDgDGHeb2VQ9qM6 h0GKcZQHwzkEF3s5xo5IaE3Jwdw/LOU2dFzW3si3IXDq6hu7c3XkrL/YRzO78MBoyVWo eAmPL2lk1O+N8NxEFiBSDUaDndSW8Zh0s1X+tP7Qdb42CgTcb/9SHWTnDd2tOmqdLkjb pxvhBwJli4r9wsrudT70k8w2oF8u35oSi5trs9V18MiMkzgUE/uaTgQJEdp/dWc7FJxH QoYleBipMWcvOJaPdBgFyJHS4/U6/6oZvWqNcrugRatyeuXBBsIFNt2ymuvkCGYyV0K6 ypJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=9h8HvY0QCiYW4YE1dlXlhHYdHZGbj7xacvvYw2cGE+w=; b=W029AfniKZpJawhb0oilV5KikiIP5ZAchsBKAxhyXp1U0aQ9olnW5P2v8cMEjJj+I2 xZmSVlazLQfeTuKYQWl3FuSvcJ9UAC+tWSqR/ewaNlveTwGOZuaRBJmpK4/zSnm/fy6c N1vouIfLt+rK8gaIgTID/65iwFnHaCdMK0KAx254WV0oidyxfpvhxKMAyvSBU30EsDAK 0x1Ljx2Om2bJxX79MjWjrvReZ8SSvrO59MeCZZJKzKCQ3RKWIYrE0BeWFcAUadnLbUqq K/7BmLZiPpDvPhI/HtoCS/bPmLcgkz1cMdxqFEh0QNfymG+f8gfAXT4L6vN9ACjWdCvA xUzQ== X-Gm-Message-State: ALyK8tInT5p6V/K0JW97M9D9aiR2eoucxejR0ou5dnBd+MK/YWSOBsMOn7HopqgECj4LSQ== X-Received: by 10.25.158.73 with SMTP id h70mr4178867lfe.41.1464069686960; Mon, 23 May 2016 23:01:26 -0700 (PDT) Received: from nikita-pc (broadband-95-84-234-130.nationalcablenetworks.ru. [95.84.234.130]) by smtp.gmail.com with ESMTPSA id po2sm195568lbb.49.2016.05.23.23.01.25 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 23 May 2016 23:01:26 -0700 (PDT) Content-Type: text/plain; charset=koi8-r; format=flowed; delsp=yes To: internals@lists.php.net, "Markus Fischer" References: <02cd6780-5113-3c37-2ae7-75f9a8465b63@fischer.name> Date: Tue, 24 May 2016 09:01:27 +0300 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <02cd6780-5113-3c37-2ae7-75f9a8465b63@fischer.name> User-Agent: Opera Mail/12.17 (Win32) Subject: Re: [PHP-DEV] [RFC] [Vote] Callable types (now: Callable prototypes) From: inefedor@gmail.com ("Nikita Nefedov") On Mon, 23 May 2016 22:59:10 +0300, Markus Fischer wrote: > Hello Nikita, > > On 23.05.16 21:27, Nikita Nefedov wrote: >> When you pass an `int` to a `string` type parameter in weak mode >> it's being coerced to the needed type (not just directly passed). >> >> This is quite complex, because you'd need to copy zend_function >> and all its members (without changing the original zend_function). >> >> I would love to support it but all in all it comes down to >> implementation here for me, so I'd rather do it in a separate >> RFC. > > > I like the RFC, however I do not like this behavior. > This would behave differently then how current weak/strict mode works. > > I was never a fan of the weak mode to begin with, but now introducing > something which deals in the area of argument passing and not behaving > to what a 2/3 majority agreed is IMHO a no-go. The current RFC does not > even mention that. > > Maybe it's not feasible anyway, but in any case I'm missing > input/discussion in this area. > > - Markus > Morning Markus, Well, those strict/weak modes were initially invented for basic types, not for composite types so I'd question if their support is needed at all... For example regardlessly of what mode your file in, if you implement an interface with `function foo(int $b)` you'd always have to implement it with `int`, and not `float`.