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

I think that one depends on the language. In F#, for example, records are pass-by-reference and structs are pass-by-value.

In a language-unspecified setting I like to follow the convention that structs are implied to be mutable data types and records are implied to be immutable data types. I don't know how widely-used that convention is, though.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: