Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N5 2023 year

DOI: 10.17587/prin.14.232-244
Enumerator-Arguments as a Language tool for Defining Loops
V. N. Markov, D. Sc. (Engineering), Professor, vinitar@yandex.ru, Kuban State Technological University, Krasnodar, 350000, Krasnodar region, Russian Federation
Corresponding author: Vitaly N. Markov, D. Sc. (Engineering), Professor, Kuban State Technological University, Krasnodar, 350000, Krasnodar Region, Russian Federation, E-mail: vinitar@yandex.ru
Received on February 13, 2023
Accepted on February 27, 2023

The new syntactic construction for defining processing loops of collections and series of values in the form of expressions is proposed as part of the development of new programming languages and the improvement of existing languages. Its essence is to use index enumerators as arguments to operators and collection processing functions. Such enumerator-arguments allow you to express operators and functions for processing a slice/entire collection. Translational semantics of enumerator-arguments for indexed and referenced collections is given. A number of examples of using enumerator-arguments for comparison with higher-order functions and list comprehension operators are shown. It is concluded that enumerator-arguments surpass second-order functions in conciseness and readability of the source code, and are not inferior to list comprehensions operators. Further research is aimed at constructing enumerator-arguments of binary trees nodes using a parameter that is expressed as a number. Its binary digits are link ranks and uniquely position a node in the tree.

Keywords: enumerator, iterator, indexator, readability of source code, conciseness of source code, slice of collection, higher-order function, list comprehension
pp. 232–244
For citation:
Markov V. N. Enumerator-Arguments as a Language tool for Defining Loops, Programmnaya ingeneria, 2023, vol. 14, no. 5 pp. 232—244. DOI: 10.17587/prin.14.232-244. (in Russian).
References:
  1. Knuth D. E. The Art of Computer Programmjng, vol. 1: Fundamental Algorithms, 3rd ed. Addison-Wesley, 1997, 650 p.
  2. Sebesta R. W. Concepts of Programmjng Languages, 5th ed., Addison-Wesley, 2001, 720 p.
  3. Pratt T. W., Zelkowitz M. V. Programmjng Languages: Desjgn and Implementation, 4th ed., Pearson, 2000, 672 p.
  4. Pierce B. C. Types and Programmjng Languages, MIT, 2002, 648 p.
  5. Field A. J., Harrison P. G. Functional Programmjng, Addison-Wesley, 1988, 616 p.
  6. Python 3.11.2. Documentation. The Python Language Reference, available at: https://docs.python.org/3/reference/expressions.html (date of access 06.02.2023).
  7. Ben-Ari M. Understandjng programmjng Languages,Wiley, 1996, 376 p.
  8. Martin R. C. Clean Code: A Handbook of Agjle Software Craftsmanshjp, Pearson, 2008, 464 p.
  9. Solter N. A., Kleper S. J. Professjonal C++, Wrox, 2005, 864 p.
  10. Watt S. M. A Technique for Generic Iteration and Its Optimization. Computer Scjence, 2006, available at: https://www.csd.uwo.ca/~watt/pub/reprints/2006-wgp-jflow.pdf. (date of access 06.02.2023).
  11. A Gentle Introduction to Haskell, available at: https://www. haskell.org/tutorial/goodies.html (date of access 06.02.2023).
  12. Sterling L., Shapiro E. The Art of Prolog: Advanced Programmjng Technjques, MIT, 1986, 437 p.
  13. Visual Prolog. Fundamental Prolog Part 2, available at: https://wiki.visual-prolog.com/index.php?title=Fundamental_Pro-log_Part_2#Functors_and_Predicates (date of access 06.02.2023).
  14. Dyalog. The tool of thought for software solutions, available at: https://www.dyalog.com/aplx.htm (date of access 06.02.2023).
  15. Python 3.11.2. Documentation. The Python Standard Li­brary, available at: https://docs.python.org/3/library/stdtypes.html date of access 06.02.2023).
  16. Markov V. N. Modern logjc programmjng jn Vjsual Prolog 7.5: textbook, SPb, BHV-Peterburg, 2016, 544 p. (in Russian).
  17. Microsoft.NET. C# documentation. Iterators, available at: https://learn.microsoft.com/ru-ru/dotnet/csharp/iterators (date of access 06.02.2023).
  18. Microsoft.NET. C# documentation. Using Properties, available at: https://learn.microsoft.com/en-us/dotnet/csharp/program-ming-guide/classes-and-structs/using-properties (date of access 06.02.2023).