Re: Re: internals Digest 23 Nov 2013 16:10:48 -0000 Issue 3139

From: Date: Sat, 23 Nov 2013 20:43:42 +0000
Subject: Re: Re: internals Digest 23 Nov 2013 16:10:48 -0000 Issue 3139
References: 1 2  Groups: php.internals 
Request: Send a blank email to internals+get-70331@lists.php.net to get a copy of this message
> That's interesting. Most languages implement ** according to standard > math rules. VB did not follow this standard (they just did left to > right). I strongly differ with the idea that written math rules can be, let alone must be, respected in a flat line of ASCII. It's a different domain, and making PHP more like "math" is not going to help the language. For example, how any modern languages let you write "xy" to mean x times y, like it would on a blackboard, if xy is not a declared variable? Don't tell me it wouldn't be _possible_, but surely we accept that ship has sailed. > What your suggest is that PHP implement it like VB so then most web > languages (code) will be consistent, even if different than standard > math (read: generate the wrong answer). Why should we follow in the > footsteps of Microsoft's mistakes? Is trying to win the hearts of VB > programmers that important? First, I'm against adding this operator. The strongest cue from other major web languages right now (C#, JS) is to not have the operator at all. Second, winning the minds of VB [and VB.NET and ColdFusion] programmers is important for a language that's seen as not as modern or professional as the other sidegrade/upgrade paths, but much more usable. Someone coming from the simple but dying (and I think quite cool) world of CF will be intimidated by C# unless they've already been using the CF-Java bridge, and likewise people feeling pushed to stop using VB-like languages find C# overwhelming. I think PHP is the right upgrade path for those people. I can't accept that such considerations are off-topic... or certainly no more off-topic than whether PHP should try to emulate a Trapper Keeper! > Given that COBOL, FORTRAN, PERL and PYTHON all do it right > associative, I expect that total lines of code is on the right > associative side if you count all code and not just web sites (the > code bases for COBOL, FORTRAN and PERL are giant). I feel either PHP does its own thing or it gets cues from other web languages. I think I have demonstrated that a clear majority of the current production web code that supports the feature does it left-associative. And a staggering majority of the current web code, period (thus including PHP, JS, and C#) either doesn't support the feature *or* does it left-associative. -- S.

« previous php.internals (#70331) next »