comp.lang.ada
 help / color / mirror / Atom feed
From: "Nasser M. Abbasi" <nma@12000.org>
Subject: Re: Java and Python have just discovered "record" type finally after 40 years.
Date: Sun, 14 May 2023 02:20:42 -0500	[thread overview]
Message-ID: <u3q24b$2ija0$1@dont-email.me> (raw)
In-Reply-To: <u3q03n$2iba1$1@dont-email.me>

On 5/14/2023 1:46 AM, J-P. Rosen wrote:
> Le 13/05/2023 à 18:53, Niklas Holsti a écrit :

>> for Pascal.
>>
>> Early LISP languages did not have record types, AFAIK. But you could of
>> course use lists to program record-like data structures.

> Of course, in LISP there is only one structure, for data and programs
> alike: the list!
> 

This is similar to Mathematica. I programmed a little in lisp,
and it was kinda fun.

In Mathematica, its main data struct is also the list
and list of lists and list of list of lists and so on.

a={1,2,3};
a={{1,2,3},{4,5,6}};

Everything in Mathematica is pretty much build using lists.

Few years ago, Wolfram introduced Association, which
acts like a RECORD. It is really like a dictionary. It has
key->value pairs so one can do:

       myData = <| "name"->"me","age"->99 |>

To read value of a field one uses myData["name"] or myData["age"].

It is amazing how people can program so much code
using only just a list as the main basic data structure
and be able to get away with it :)

I think RECORD is the most important data structure myself.

Without a RECORD (called struct in C), programming
is much harder.  This is what Java and Python have discovered
just now.  I guess the language designers of these
languages never bothered to look at Pascal or Ada before.

But better late than never I guess.

--Nasser




  reply	other threads:[~2023-05-14  7:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-12 17:50 Java and Python have just discovered "record" type finally after 40 years Nasser M. Abbasi
2023-05-12 18:58 ` richardthiebaud
2023-05-12 21:33 ` Jeffrey R.Carter
2023-05-13  7:13   ` Niklas Holsti
2023-05-13 11:18     ` Luke A. Guest
2023-05-13 16:53       ` Niklas Holsti
2023-05-14  6:46         ` J-P. Rosen
2023-05-14  7:20           ` Nasser M. Abbasi [this message]
2023-05-14  9:49             ` Luke A. Guest
2023-05-14  9:43           ` Luke A. Guest
2023-05-14  9:45           ` Luke A. Guest
2023-05-14 10:29           ` Niklas Holsti
2023-05-14 10:37           ` Ben Bacarisse
2023-05-14 10:39           ` Jeffrey R.Carter
2023-05-14 15:10             ` J-P. Rosen
2023-05-14 15:14             ` Ben Bacarisse
2023-05-14 16:56               ` Jeffrey R.Carter
2023-05-15  1:11                 ` Ben Bacarisse
2023-05-15 10:44                   ` Jeffrey R.Carter
2023-05-17  0:24                     ` Ben Bacarisse
2023-05-14 12:46           ` Bill Findlay
replies disabled

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