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

> P.S. I never understood why Go uses words like "receiver" and "marshaling" that are rarely used elsewhere

What else are you familiar with? Those are extremely common terms in the object oriented community.




Method? Serialize?


A receiver isn't a method. It's the "self" instance the method is invoked on. It's standard OOP terminology.

I'm with you regarding marshaling, but not because it's not an industry-standard term, it's just that Go misapplies it. Marshaling historically has referred to describing a remote procedure call and its return value; for example, you call "CreateFoo()" with a "CreateRequest", the latter must be marshaled into a payload that the remote call can read. For a network call this requires serializing the data to bytes using some kind of format, but for a local call it could just be a pointer to a data structure. However, historically people have often mixed the two terms. Python's standard library also misuses "marshal" to refer to serialization.


The history on marshaling goes back further than that. Smalltalk used the word more or less how it’s used in Go. There is definitely an RPC connotation these days though, probably because small talk was based on message passing.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: