Re:What Every Programmer Should Know About Memory (2007) [pdf]
by amelius on Monday March 04, 2019 @03:11PM
(#19304874)
I'm sure some programmers don't need to know this. For example an Erlang or Haskell programmer can't do anything about memory layout anyway, so this knowledge would be of no immediate practical use.
[ Parent
| on HN ]
Re:What Every Programmer Should Know About Memory (2007) [pdf]
by yetihehe on Tuesday March 05, 2019 @02:44AM
(#19308871)
> For example an Erlang or Haskell programmer can't do anything about memory layout anyway
No, but we can make algorithms that will do things in other ways than standard. Knowing memory layout and behaviour enables programmer to invent better ways to do things. Of course those algorithms are very application specific, but at least it increases solution space. Erlangers mantra here is "profile this" so that you know which one is actually better.
Re:What Every Programmer Should Know About Memory (2007) [pdf]
by agentultra on Tuesday March 05, 2019 @04:27PM
(#19314410)
Not exactly. There's plenty of ways of looking at GC and controlling allocation and lifetimes in Haskell is definitely possible.
And when necessary the C FFI is useful to have to write small bits of code to take advantage of particular layouts and drive them from code. See [0].