Friday, February 28, 2025

So...this is 🀯 moment?

I was studying for college exams, trying to wrap my head around this 'call by value' concept in functions. We'd done the usual examples - passing copies of documents, not the originals. After done studying , I was having my dinner, I had a striking thought, how kids inherit traits from their parents. And then it hit me - genetics is basically call-by-value IRL! Think about it. When a kid gets their parents' genes, they're not getting the actual original genetic code. They're getting a copy. Just like how a function gets a copy of the original value, not the value itself. The parents' genetic code stays unchanged, just like the original value in the caller function. And the kid's genetic code is its own separate thing, like the local copy of the value in the called function.
Mind. Blown.πŸ™‹

No comments:

Post a Comment

Day 4-5 of hr-analytics-project

Last night I finally finished designing dashboard of this hr analytics project.  It had four pages. At that time I genuinely thought it look...