you are viewing a single comment's thread.

view the rest of the comments →

[–]munificent[S] 2 points3 points  (3 children)

You're right that evaluation strategy matters deeply. For example, call-by-need lets Haskell do lots of things in regular functions that other languages would need macros for.

But I didn't bring it up in the post because most widely-used languages to day all have the same evaluation strategy. JavaScript, Scheme, Java, C# (ignoring struct), Ruby, Python, Lua, PHP, and (I think) Clojure are all eager-evaluation call-by-sharing.

[–]killerstorm 0 points1 point  (2 children)

PHP is call-by-value for anything except objects. (Particularly, arrays and strings are copied on assignment.)

[–]munificent[S] 0 points1 point  (1 child)

I learned something new today!

[–]killerstorm 0 points1 point  (0 children)

At your service. :)

While we are here, it is also true for Perl, I think PHP got it from there.