4 ms·
Zend the organisation, is probably what Marco meant when referring to poor stewardship, instead of the OS project Zend Framework. I like Hack because it explic
by RossM 13y ago
Zend the organisation, is probably what Marco meant when referring to poor stewardship, instead of the OS project Zend Framework.
I like Hack because it explicitly doesn't support[0] a bunch of cruft from PHP. It feels a lot to me like the BC-breaking PHP.next people want - easy to switch to for modern applications, but not hindered by supporting PHP 4 code. Bit early to start pointing fingers at it's future though.
[0]: http://docs.hhvm.com/manual/en/hack.unsupported.php http://docs.hhvm.com/manual/en/hack.unsupported.php
- jimhart3000 13y ago> Writing list(, $b) = array(3,4) is not allowed. Instead use $_, i.e.: list($_, $b) = array(3, 4). Not that I think the former is good practice at all, but isn't the latter a kind of weird use of what is a valid variable name?
- wting 13y agoUsing _ as a throwaway variable name is idiomatic in Python, Haskell, and Go. Looks like they're pushing the same idiom in Hack, which I'm ok with.
- agumonkey 13y agoAFAIK in Haskell it's not a throwaway variable, a pattern with _ will not create a binding at all. I don't think Python does this, maybe Go.
- MBlume 13y agoPython doesn't have language support for the idiom -- trying to evaluate lambda _, _: None gives SyntaxError: duplicate argument '_' in function definition but tools like pylint will silence unused-variable warnings if the variable starts with '_'.
- agumonkey 13y agoThanks for the verification. But even a bit of syntactic convention won't be enough if python create a unnecessary binding.
- wycats 13y agoAnd Ruby, and Rust. It's close to universal.
- wtetzner 13y agoAnd Clojure.
- underwater 13y agoIt is a variable, not a language construct. The docs are just recommending `$_` as a convention over something like `$temp`.