Better HN
topnewbestaskshowjobs
Log inSign up

fjuwnsd

1 karma · joined Nov 29, 2024 (2y ago) · 1 submissions

Submissions

comment 2y ago · link · parent

Because most devs don't think from type theory principles.

They see the keyword "struct" and associate it to C# struct which is stack allocated.

Then they see the keyword "record" and think Java record which is syntax sugar for class which is heap allocated.

They never draw the connection that they are both ways to express product types.