News for hackers. Stuff that matters.
Re:Type Theory and Functional Programming (1999) [pdf] by remexre on Wednesday October 01, 2025 @08:55AM (#45437119)
> These so-called dynamic types are merely the equivalent of tags in a discriminated union/variant type.

That's far more true in a language like JavaScript or Scheme than in an "everything is an object" language like Python; the only reason why you would need a variant type for PyObject is to avoid the circular data structures the actual implementation uses.

If you allow the circular data structures, your dynamic types instead are "merely" a relatively complicated codata type, but it's far less obvious that this is actually what anyone considers to be "merely."

There are no comments on this comment yet.