Hacker News new | past | comments | ask | show | jobs | submit login

When I say ”by value”, I mean the abstraction the programmer is exposed to, not the internal implementation detail. In a Haskell implementation, the environment may well be internally represented as a pointer, but the programmer doesn't need to worry about that. On the other hand, a Go, Python or Lisp programmer is constantly and painfully reminded of the difference between copying an object and pointing to a pre-existing object.



Haskell programmers do have to think about it as being by-reference if they want to understand the performance/memory-use due to sharing.

But for correctness, yeah, you just don't have to think about it. So you don't think "by value" or "by reference", it just becomes something obvious that you don't need to think about.


> Haskell programmers do have to think about it as being by-reference if they want to understand the performance/memory-use due to sharing.

Oh, right.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: