comp.lang.ada
 help / color / mirror / Atom feed
From: gautier_niouzes@hotmail.com
Subject: Re: Recursive algebraic data types
Date: Tue, 6 Mar 2018 12:45:01 -0800 (PST)
Date: 2018-03-06T12:45:01-08:00	[thread overview]
Message-ID: <65e6d0f9-7457-4584-9160-b5ca9db24599@googlegroups.com> (raw)
In-Reply-To: <7744da76-0ea5-459e-a55d-8b16d7b3ccdb@googlegroups.com>

> for definition: please have a look at https://en.wikipedia.org/wiki/Recursive_data_type

"In computer programming languages, a recursive data type (also known as a recursively-defined, inductively-defined or inductive data type) is a data type for values that may contain other values of the same type."

The definition given above is nonsensical: either the data type is empty or infinitely large...

In the examples given (List), the type names can mean either a pointer to the real data, or the data itself (a list's node in that case). Clearly they are playing with words there: a node doesn't really contain the next node, but a pointer (or a reference) to the next node. So it's not really recursive, only in appearance. They play with a shortcut notation.

  reply	other threads:[~2018-03-06 20:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 19:46 Recursive algebraic data types hnptz
2018-03-06 19:58 ` hnptz
2018-03-06 20:45   ` gautier_niouzes [this message]
2018-03-07  5:53     ` Niklas Holsti
2018-03-07  8:31       ` Dmitry A. Kazakov
2018-03-06 20:28 ` Randy Brukardt
2018-03-06 20:54   ` Jeffrey R. Carter
2018-03-06 21:14   ` Dmitry A. Kazakov
2018-03-06 21:25 ` Dmitry A. Kazakov
2018-03-06 21:54 ` hnptz
2018-03-07  7:58   ` Jacob Sparre Andersen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox