From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-65-14.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.7 required=3.0 tests=BAYES_00,NICE_REPLY_A, REPLYTO_WITHOUT_TO_CC,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Nasser M. Abbasi" Newsgroups: comp.lang.ada Subject: Re: Java and Python have just discovered "record" type finally after 40 years. Date: Sun, 14 May 2023 02:20:42 -0500 Organization: A noiseless patient Spider Message-ID: References: Reply-To: nma@12000.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 14 May 2023 07:20:43 -0000 (UTC) Injection-Info: dont-email.me; posting-host="98651a381a0976f46ab351bfb4962cf5"; logging-data="2706752"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ZVzqKp9j+nUPUoqvE3nW0" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Cancel-Lock: sha1:7K86qX8qpQE3cybVfnDwZN5K0Gg= In-Reply-To: Content-Language: en-US Xref: news.eternal-september.org comp.lang.ada:65224 List-Id: 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