[erlang-questions] The way of accessing record's attributes.
Richard A. O'Keefe
Wed Nov 9 02:13:59 CET 2016
> On Tue, Nov 08, 2016 at 04:21:59PM +0100, Alex Feng wrote:
>> Thank you all for the detailed explanation, I guess I was trying to use
>> "C/C++" way of thinking to understand <record>.
For what it's worth, you may have noticed that a lot of structs
in the UNIX api have prefixes on their fields, e.g.,
tm_sec, tm_min, tm_hour, or st_dev, st_ino, st_mode, ...
The reason is simple: there was a time before C got typed
pointers (indeed, when it just barely had types at all),
so the prefixes were necessary for disambiguation in the very
The "C way of thinking" hasn't always been the same.
More information about the erlang-questions