top | item 17334770

(no title)

Randgalt | 7 years ago

I'm old enough to remember programming for the original Macintosh which used handles and relocatable memory. It was a nightmare. Constantly locking, unlocking handles was a chore and error prone. I also remember early Windows APIs that had opaque handle-based memory allocations. Sometimes in life it's useful to check your history books and understand why some things were consigned to history.

discuss

order

perl4ever|7 years ago

Constantly locking and unlocking handles was the problem. The whole point of having handles was so they could be moved around, and locking them defeated the purpose. People just created their own problems by dereferencing a handle and then wondering why their pointer became invalid and then locking stuff willy-nilly to prevent it.

taeric|7 years ago

And sometimes, the reasons themselves are historical and the technique can get a resurgence.

Specifically, this can easily be used to create a narrative for many functional idioms. The cost of memory and compute has been a large part of the ride in many modern tricks.