The Haskell version would be a recursive function from cups to cups, which creates 100 intermediate cups in the process.
-
-
-
and never fills them.
- 1 more reply
New conversation -
-
-
@brianhicks Who added milk to my Espresso?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@YGalanter If cup is a NULL pointer, does the coffee spill on the table or just disappear? -
there won't be a cup there in the first place and if you pour coffee into the empty it will be all over the table :)
-
(though for complete analogy coffee should be replaced with acid. If there's no cup - your table will burn and break)
End of conversation
New conversation -
-
-
@jen20 Were I an animator, I would volunteer an example of pass-by-name. - 1 more reply
New conversation -
-
-
Can we get a concurrent `human.drinkAll(cup)` visualization for both by reference and by value?
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
the shade in the replies is unfortunate and inaccurate. What kills people is that Java is pass-by-value-of-pointer.
-
Java doesn't have pass-by-reference semantics, contrary to what people believe.
-
oh didn't even read replies or think abt Java. i read his Erlang book so thought it was a general knock on some imperative langs
-
Ruby works pretty similarly to that i believehttp://stackoverflow.com/a/10974116/215168 …
-
that's because it's the easy way
End of conversation
New conversation -
-
-
I still don't get it :S
-
Pass by reference means "Fill this cup", Pass by value means "Fill a copy of this cup".
End of conversation
New conversation -
-
-
value; the cup should be half full to start as a value of zero isn't a good example visually. Ref; only original cup should fill
-
, that's why the reference cup is shaded
End of conversation
New conversation -
-
-
yes but one of them ended up with NO COFFEE sheesh! you guys!
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.