Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:65955 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67951 invoked from network); 19 Feb 2013 14:45:13 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Feb 2013 14:45:13 -0000 Authentication-Results: pb1.pair.com smtp.mail=arvids.godjuks@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=arvids.godjuks@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.182 as permitted sender) X-PHP-List-Original-Sender: arvids.godjuks@gmail.com X-Host-Fingerprint: 209.85.212.182 mail-wi0-f182.google.com Received: from [209.85.212.182] ([209.85.212.182:50204] helo=mail-wi0-f182.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 87/79-17768-7FF83215 for ; Tue, 19 Feb 2013 09:45:13 -0500 Received: by mail-wi0-f182.google.com with SMTP id hi18so4864082wib.9 for ; Tue, 19 Feb 2013 06:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=ULY31weiNrlIne6HyDH7RE8Zzao8daUUxOL4XFjlOUI=; b=bre3nxmAyoY9qPAUA9CJ3lC+iMzUZdNZT6ssXfBPmDxws0Lex87O4FIseiulD68m/y hr9Yd+ZL/6FJhwsWH8MXuyotsggnMCBd5Vv2OLzyU5B0kR/1FSGo0TPnlWmOwMxlDooL GoBgSHIUdH66ClyybmLo5QCy0AsqcZSjq8XE9DHtT0MNEBEnEzW7wAjG95Jh6Lgj7t4J ampJZg33PG+5QYI8cwGKVBQbe/WGf2+Bb6/mcrd2IMQJ87ROFw8JJHmvHktluXdAvCje 8eraymelTH5lfXN7NxfwBKwqIt4iySfv3zNt3ip+ZqkhIkcpQTu0VAeEgnlAlAgIro7a mAqw== X-Received: by 10.194.60.195 with SMTP id j3mr26848646wjr.33.1361285098232; Tue, 19 Feb 2013 06:44:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.194.61.76 with HTTP; Tue, 19 Feb 2013 06:44:38 -0800 (PST) In-Reply-To: References: <8490FC41-2696-4948-83A1-3931674183B0@gmail.com> <3EBB0AF2-A114-4652-806B-C50DD8F9557D@inviqa.com> Date: Tue, 19 Feb 2013 16:44:38 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary=047d7b86e2f8b7dcf404d614e20b Subject: Re: [PHP-DEV] [RFC] Short syntax for anonymous functions From: arvids.godjuks@gmail.com (Arvids Godjuks) --047d7b86e2f8b7dcf404d614e20b Content-Type: text/plain; charset=UTF-8 I also don't like the RFC proposed syntax. I have to say that I don't really like those short magic-like syntax things in in other languages too. If you work with them on the day-to-day basis and tools are built around those concepts - it's one thing. In PHP syntax is mostly self-explanatory and for the most part there is only one way to do it (or the differences in syntax have their own uses - like for () {} is used in code and for (): endfor; is good for templates). I like the current $x = function () {}. It's the same in JavaScript (and because most of us use jQuery - we use it a lot) and realistically I don't type it - IDE does auto-complete for me. P.S. I want to tell all those syntax enhancement guys - don't push syntax-sugar stuff into PHP for the sake of shorter syntax. First, for the most part it looks alien in PHP. Second - it really depends on the preception - I for example hate Ruby syntax, it's crap and unreadable - this just illustrated that's one mans beauty is other mans ugly. PHP syntax maybe not the most pretty out there, but it is sure as hell easy to read even if coder makes a mess of it. I saw the opinion on the internet that PHP is a scripted version of C in the sense of their positioning and usage. And I totally agree with it, and I want it to stay that way. PHP should not be the pretty one, or be on the feature edge. PHP needs to just walk with time and adopt the good stuff fully integrating into itself, not just patching the core and adding some half-weird syntax that just doesn't really fit PHP. You also have to remember that PHP is a WEB development script language, not general purpose script language like Ruby or Python. Not all features, that are good in general purpose languages, are good for WEB language. Some of those features may bring performance hits that are not worth it. My 0.02$, Arvids. --047d7b86e2f8b7dcf404d614e20b--