3 ms·
Why not?
by Killswitch 13y ago
Why not?
- retrogradeorbit 13y agoBecause it will introduce another layer of bugs and corner cases on top of the already existing ones in PHP.
- lukeholder 13y agoOr it could make the php bugs and corner cases impossible to access, and produce far more reliable PHP code. Edit: As child post asked: That is the purpose on making something like this or coffeescript. We may all know the edge cases and bugs and know how to write pure php that gets around this, but why should we? Shouldn't our tools serve us and not the other way around? Something like mammoth might actually bring me productivity and enjoyment - which I think in the end is what drives developers.
- krapp 13y agoBut, as with Coffeescript/JS, wouldn't the better alternative be to learn those bugs and edge cases and code it up properly in the original language to begin with?
- lukeholder 13y agosnarky response: why use an programming language to manipulate memory and just code in assembly?
- Gigablah 13y agoI don't know about productivity, if you look at the side-by-side comparisons, the savings are generally one or two lines at most. There's nothing in there that actually helps with the idiosyncrasies of PHP -- for example, returning a sane default when accessing nonexistent array elements. Also, PHP 5.4 already has the JS-style array notation. And I really have to wonder about the enforced breaks in their implementation of switch/case, because there are times when you do want to fall through to the next case.
- lukeholder 13y agoIts too early to judge that it makes no improvements, because it does not claim to yet! It currently is only slightly reducing the weight of the code - it doesn't even support classes yet! I am sure if it matured, you would start to identify way in which it could improve PHP by hiding PHP gotchyas, and doing all the boilerplate to get around them.