August 14, 2020 - Categories: IT/Software Projects

I’m not an authority on this - take my explanation with a grain of skepticism and do your own research.

I’ve been working on going over some of the fundamentals of computer science recently since I don’t have a traditional computer science education. Pass-by-value recently came up, and I thought it would be a quick foray to properly learn the difference between pass-by-value and pass-by-reference. Surely something so fundamental must have clear answers, right?

And then it turned into a huge fucking rabbit hole, with lots of dissenting views, and very confusing discussions. Just Google it, check out some of the StackOverflow articles. There’s a lot of content, but it’s not very clear. In the abstract, the concepts are simple. In the context of Python and Ruby, it’s a confusing mess.

So that’s what this post is about - trying to clarify the differences between the two and define what “pass-reference-by-value” actually means.