Re:Reboot PHP: keep the philosophy, improve the syntax (PHP ...
by jrockway on Friday April 30, 2010 @12:59PM
(#1308711)
If only there was a programming language where you could write something like:
do { foo; bar; baz }
or: do
foo
bar
baz
and they would both be equivalent.
Re:Reboot PHP: keep the philosophy, improve the syntax (PHP ...
by alaithea on Friday April 30, 2010 @01:43PM
(#1308835)
I'm not sure if your comment was intended as sarcasm, but you can pretty much do this in Ruby.
myarray.each {|x| func_a(x); func_b(x); puts x }
is equivalent to myarray.each do |x|
func_a(x)
func_b(x)
puts x
end
You should read the book by Douglas Crockford - JavaScript: The Good Parts, p102 (Appendix A: Awful Parts), this is not fun.