Array programming: Difference between revisions

Content deleted Content added
mNo edit summary
Array languages: this was a thesis
Line 48:
In array languages, operations are generalized to apply to both scalars and arrays. Thus, ''a''+''b'' expresses the sum of two scalars if ''a'' and ''b'' are scalars, or the sum of two arrays if they are arrays.
 
An array language simplifies programming but possibly at a cost known as the ''abstraction penalty''.<ref>{{cite journalthesis|author=Surana P |title=Meta-Compilation of Language Abstractions. |year=2006 |url=ftp://lispnyc.org/meeting-assets/2007-02-13_pinku/SuranaThesis.pdf |access-date=2008-03-17 |url-status=dead |archive-url=https://webdl.archiveacm.org/webdoi/20150217154926book/http://lispnyc10.org5555/meeting-assets/2007-02-13_pinku/SuranaThesis.pdf |archive-date=2015-02-17 1195058}}</ref><ref>{{cite web |last= Kuketayev |title= The Data Abstraction Penalty (DAP) Benchmark for Small Objects in Java. |url= http://www.adtmag.com/joop/article.aspx?id=4597 |access-date= 2008-03-17 |archive-url= https://web.archive.org/web/20090111091710/http://www.adtmag.com/joop/article.aspx?id=4597 |archive-date= 2009-01-11 |url-status= dead }}</ref><ref>{{Cite book |last= Chatzigeorgiou |last2= Stephanides |editor-last= Blieberger |editor2-last= Strohmeier |contribution= Evaluating Performance and Power Of Object-Oriented Vs. Procedural Programming Languages |title= Proceedings - 7th International Conference on Reliable Software Technologies - Ada-Europe'2002 |year= 2002 |pages= 367 |publisher= Springer |url= https://books.google.com/?id=QMalP1P2kAMC&dq=%22abstraction+penalty%22 |isbn= 978-3-540-43784-0 }}</ref> Because the additions are performed in isolation from the rest of the coding, they may not produce the optimally most [[algorithmic efficiency|efficient]] code. (For example, additions of other elements of the same array may be subsequently encountered during the same execution, causing unnecessary repeated lookups.) Even the most sophisticated [[optimizing compiler]] would have an extremely hard time amalgamating two or more apparently disparate functions which might appear in different program sections or sub-routines, even though a programmer could do this easily, aggregating sums on the same pass over the array to minimize [[Computational overhead|overhead]]).
 
====Ada====