I gave a slightly rough talk about "Thinking with Laziness"[1] which tries to capture how expressive it can be. I'm a big fan and sad that so many people are willing to categorically dismiss it as a wart in Haskell.
[1]: https://begriffs.com/posts/2015-06-17-thinking-with-laziness...
if False and (fibonacci(1000)/fibonacci(1000)):
print "Nope"
It will immediately evaluate to False and pring "Nope" rather than checking the (fibonacci(1000)/fibonacci(1000)) portion of the conditional.EDIT: Side note, is there a shortcut for displaying code snippets within HN posts? Extra returns (what I usually use for clarification by formatting) do not display very well.
(if isset($foo) && $foo == 14)
If $foo is not set the second boolean expression is not evaluated (short circuit evaluation).
In fact, checking if isset followed by another boolean expression is very idiomatic in PHP.
Indent your code snippets with a minimum of four spaces and they will be rendered as preformatted, monospaced text. Vertically adjacent lines thus indented will be rendered as a single block.