[HN Gopher] Values and objects in programming languages (1982) [...
___________________________________________________________________
Values and objects in programming languages (1982) [pdf]
Author : jgrodziski
Score : 44 points
Date : 2023-01-09 17:24 UTC (5 hours ago)
(HTM) web link (dl.acm.org)
(TXT) w3m dump (dl.acm.org)
| avgcorrection wrote:
| This is a very nomenclature-focused essay. But the names are
| still relatively salient for modern use. Relatively.
| tuukkah wrote:
| Really interesting to compare such early thinking to where we are
| today.
|
| > _4. Values and objects in programming languages_
|
| > _Most languages confuse them._
|
| Indeed. All programmers have an intuition of (primitive,
| immutable) values and (mutable) objects, but e.g. Dan Abramov
| claims the intuition is often lacking w.r.t. how a specific
| language actually works in practice. His book Just JavaScript
| explicitly describes the full mental model for one language, and
| I found this approach valuable when I taught a JS bootcamp.
| https://justjavascript.com/
|
| For example, JS strings are superficially similar to an array of
| characters, but their semantics such as equality are completely
| different because strings happen to be primitives while arrays
| are not.
|
| > _Names should be fixed._
|
| Here, they are advocating the use of const/final (single-
| assignment) variables, which has become a best practice but
| wasn't widely available back then. This is orthogonal to the
| value vs object distinction though (with const-immutable being
| what pure FP requires.)
|
| However, further in conclusions:
|
| > _We have shown that objects correspond to real world entities,
| and hence exist in time, are changeable, have state, are
| instantiated, and can be created, destroyed, and shared._
|
| I think this is the naive OO hype of the time (1982) talking:
| whether something should be modelled as a mutable object in a
| program is orthogonal to real world entities.
___________________________________________________________________
(page generated 2023-01-09 23:00 UTC)