PascalABC.NET: Difference between revisions

Content deleted Content added
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5
 
(47 intermediate revisions by 17 users not shown)
Line 1:
{{Short description|Computer programming language}}
{{Proposed deletion/dated
|concern = No citations (with "more citations needed" template added in April 2016), does not seem to be notable (most hits on the first 5 pages of Google are auto-generated or self-created, only 10 [https://stackoverflow.com/search?q=pascalabc.net StackOverflow questions]), conflict of interest (article created and edited primarily by two of the software’s authors).
|timestamp = 20230402125650
|nom = Kwpolska
|help =
}}
{{Multiple issues|
{{COI|date=June 2018}}
{{notability|date=April 2016}}
{{more citations needed|date=April 2016}}
}}
 
{{Use dmy dates|date=September 2016}}
{{Infobox programming language
| name = PascalABC.NET
| logo =
| screenshot = Screenshot of PascalABC.NET IDE.png
| caption =
| paradigm = [[Multi-paradigm programming language|Multi-paradigm]]: [[proceduralProcedural programming|procedural]], [[functional programming|functional]], [[objectObject-oriented programming|object-oriented]], [[genericGeneric programming|generic]]
| year = {{Start date and age|2007|df=yes|2007}}
| designer = PascalABC.NET Compiler Team
| designer = S.S. Mikhalkovich, Ivan Bondarev, A.V. Tkachuk, S.O. Ivanov
| programming_language programming language = PascalABC.NET
| latest release version = 3.8.3.31673255
| latest release date = {{Start date and age|2023|04|04|df=yes|2022|08|30}}
| typing = [[Static type|Static]], [[Type inference|partially inferred]]
| influenced by = [[Delphi (programming languagesoftware)|Delphi]], [[Pascal (programming language)|Pascal]], [[Oxygene (programming language)|Oxygene]], [[C Sharp (programming language)|C#]], [[Python (programming language)|Python]], [[Kotlin (programming language)|Kotlin]], [[Haskell (programming language)|Haskell]]
| operating_system operating system = [[Cross-platform]]
| license = [[GNU Lesser General Public License|LGPLv3]]
| website = {{URL|pascalabc.net/en/}}
| file_ext file ext = .pas
}}
 
'''PascalABC.NET''' is a [[High-level programming language|high-level]] [[General-purpose programming language|general-purpose]] [[programming language]] supporting multiple paradigms. ItPascalABC.NET is compatiblebased with classicon [[ProceduralDelphi programming(software)|proceduralDelphi]]'s [[PascalObject (programming language)|Pascal]], but providesalso extensivehas supportinfluences offrom [[Object-orientedC Sharp (programming language)|object-orientedC#]], and[[Python (programming language)|Python]], [[FunctionalKotlin (programming language)|functionalKotlin]], paradigmsand [[Haskell]]. It is distributed both as a command-line tool for Windows (native[[.NET]] framework), Linux and MacOS (Mono), and with an [[integrated development environment]] for Windows and Linux, including interactive debugger, [[Intelligent code completion|IntelliSense]] system, [[Graphical user interface builder|form designer]], code templates and code auto-formatting.
 
PascalABC.NET is implemented for the [[.NET Framework]] framework platform, so that it is compatible with all .NET libraries and utilizes all the advantagesfeatures of [[Common Language Runtime]], such as [[Garbage collection (computer science)|garbage collection]], [[exception handling]], and [[Generic programming|generics]]. Some language constructions, e.g. tuples, sequences, and lambdas, are based on regular .NET types. PascalABC.NET is ideologically close to [[Oxygene (programming language)|Oxygene]], but unlike it, provides high compatibility with [[Delphi (software)|Delphi]].
 
== Key featuresHistory of PascalABC.NET ==
PascalABC.NET was developed by a group of enthusiasts at the Institute of Mathematics, Mechanics, and Computer Science in Rostov-on-Don, Russia.<ref name=":1">{{Cite book |last=Osipov |first=Alexander V. |title=PascalABC.NET: Vvedenie v sovremennoe programmirovanie [PascalABC.NET: Introduction to Modern Programming] |publisher= |year=2019 |___location=Rostov-on-Don, Russia |pages=28 |language=ru-RU}}</ref> In 2003, a predecessor of the modern PascalABC.NET, called Pascal ABC, was implemented by associate professor Stanislav Mikhalkovich to be used for teaching schoolchildren instead of [[Turbo Pascal]], which became outdated and incompatible with modern operating systems but was still used for educational purposes. Pascal ABC was implemented as an [[Interpreter (computing)|interpreted programming language]], that led to a significant lack of performance. Four years after that it was completely rewritten by students Ivan Bondarev, Alexander Tkachuk, and Sergey Ivanov as a [[Compiled language|compiled programming language]] for the .NET platform. In 2009, PascalABC.NET started to be actively used for teaching high school students. By 2015, the number of users of the language had increased significantly. It began to be actively used throughout Russia in schools and at programming contests, surpassing [[Free Pascal]]. Since then, the PascalABC.NET developers have set themselves the goal of actively incorporating modern features into the language. In the same year, PascalABC.NET became an open source project distributed under the [[GNU Lesser General Public License]] (LGPLv3).<ref>{{Cite web |date=2021-03-30 |title=Twisted Pair Podcast, #389 |url=https://tpair.org/podcast/tp-389/ |website=Twisted Pair Podcast |language=ru-RU}}</ref><ref>{{Cite web |last1=Bondarev |first1=Ivan V. |last2=Belyakova |first2=Yulia V. |last3=Mikhalkovich |first3=Stanislav S. |date=2013-04-24 |title=PascalABC.NET programming system: 10 years of development |url=https://pascalabc.net/downloads/Presentations/10letPABC.pdf |access-date=2023-04-09 |website=PascalABC.NET}}</ref>
 
In 2017<ref>{{Cite web |date=2017-03-29 |title=Analysis of PascalABC.NET using SonarQube plugins: SonarC# and PVS-Studio |url=https://pvs-studio.com/en/blog/posts/csharp/0492/ |website=PVS-Studio |language=en}}</ref> and 2022,<ref>{{Cite web |date=2022-02-11 |title=Re-checking PascalABC.NET |url=https://medium.com/pvs-studio/re-checking-pascalabc-net-f8bfc94aba3c |website=Medium |language=en}}</ref> independent audit of [https://github.com/pascalabcnet PascalABC.NET public repository] was conducted. Based on the results of the static check, potentially dangerous code fragments were listed that require additional analysis by developers. It was also noted that the overall quality of the code could be improved. To do this, code duplication and redundant checks should be eliminated, and refactoring should be performed more carefully.
=== Pascal syntax extensions ===
* Operators <code>+= -= *= /=</code>
* in-block variable definitions
* Variable declaration in <code>'''for'''</code> loop header
* Variable declaration with initialization (<code>'''var''' n: integer := 10;</code>)
* Variable type deduction (<code>'''var''' x := 1;</code>)
* <code>'''[[foreach]]'''</code>
* Routines with a variable number of parameters
* <code>'''set'''</code> of any type (<code>'''set of''' integer</code>)
* Methods in records
* Methods defined in class declaration
* Simplified syntax of units
* Keyword <code>'''new'''</code> (invoking a constructor)
* Field initializers
* Static constructors
* [[OpenMP]] directives
* Case for strings
* Tuple type syntax (T1, T2)
* Yield and yield sequence
* Pattern matching
* Array slices
* Interpolated strings
 
== Use in school and higher education ==
=== Object-oriented features ===
Designed for education, PascalABC.NET remains the most common programming language in Russian schools and one of the recommended languages for passing the [[Unified State Exam]] on informatics.<ref>{{Cite web |title=Metodicheskie rekomendacii po podgotovke i provedeniyu edinogo gosudarstvennogo ekzamena po informatike i IKT v komp'yuternoj forme v gorode Moskve v 2021 godu [Guidelines for the preparation and conduct of the unified state exam in computer science and ICT in the city of Moscow in 2021] |url=http://rcoi.mcko.ru/resources/upload/RichFilemanager/documents/2020-2021/org_metod/11/mr_kege_inf_2021.pdf |publisher=Departament obrazovaniya i nauki goroda Moskvy [Department of Education and Science of Moscow] |page=110 |language=ru-RU |access-date=5 April 2023 |archive-date=28 January 2022 |archive-url=https://web.archive.org/web/20220128150316/http://rcoi.mcko.ru/resources/upload/RichFilemanager/documents/2020-2021/org_metod/11/mr_kege_inf_2021.pdf |url-status=dead}}</ref><ref name=":4">{{Cite web |last=Polyakov |first=Konstantin |title=Doklady na konferenciyah i seminarah [Reports at conferences and seminars] |url=https://kpolyakov.spb.ru/school/doklad.htm |language=ru-RU}}</ref><ref name=":3">{{Cite web |last=Bogdanov |first=Alexey |date=2022-10-04 |title=PascalABC.Net or Python/ C#/C++ |url=https://www.youtube.com/watch?v=RulhCYnbRAA |access-date=2023-04-05 |website=YouTube |language=ru-RU}}</ref> In the Southern Federal University, it is used as the first language for teaching students majoring in computer science, and for teaching children in one of the largest computer schools in Russia.<ref>{{Cite news |last=Popova |first=Ekaterina |date=2022-09-06 |title=Kak v Rostove gumanitarii uspeshno obuchayutsya IT-special'nostyam [How humanitarians successfully study IT specialties in Rostov] |language=ru-RU |work=Komsomolskaya Pravda |url=https://www.rostov.kp.ru/daily/27441/4643617/}}</ref> PascalABC.NET is widely used as a basic programming language in pedagogical universities for the training of computer science teachers.<ref name="MathAnim">{{Cite journal |last1=Dzhenzher |first1=V.O. |last2=Denisova |first2=L.V. |year=2019 |title=Mathematical animation in computer simulation at school |url=https://www.sciencegate.app/document/10.32517/2221-1993-2019-18-6-51-54 |journal=Informatics in School |language=ru-RU |issue=6 |pages=51–54 |doi=10.32517/2221-1993-2019-18-6-51-54 |s2cid=203704481|url-access=subscription |doi-access=free }}</ref><ref name="HammingCode">{{Cite journal |last1=Dzhenzher |first1=V.O. |last2=Denisova |first2=L.V. |year=2021 |title=Implementation of the Hamming code on PascalABC.NET while studying the theoretical foundations of informatics |journal=Informatics in School |language=ru-RU |volume=1 |issue=9 |pages=29–38 |doi=10.32517/2221-1993-2021-20-9-27-36 |s2cid=245473319|doi-access=free}}</ref><ref name="SciGraph">{{Cite journal |last1=Dzhenzher |first1=V.O. |last2=Denisova |first2=L.V. |year=2020 |title=Scientific graphics in PascalABC.NET: plotting function graphs in a rectangular cartesian coordinate system |url=https://www.sciencegate.app/document/10.32517/2221-1993-2020-19-1-31-39 |journal=Informatics in School |language=ru-RU |issue=1 |pages=31–39 |doi=10.32517/2221-1993-2020-19-1-31-39 |s2cid=215844807|url-access=subscription |doi-access=free }}</ref><ref>{{Cite journal |last=Kulabukhov |first=S.Yu. |year=2021 |title=Mathematical modeling in informatiсs lessons using numerical solution of differential equations |url=https://school.infojournal.ru/jour/article/view/528/528 |journal=Informatics in School |language=ru-RU |issue=2 |pages=14–21 |doi=10.32517/2221-1993-2021-20-2-14-21 |s2cid=235541530|url-access=subscription |doi-access=free }}</ref> It also serves as a tool for scientific computing.<ref>{{Cite journal |last1=Khazieva |first1=R.T. |last2=Ivanov |first2=M.D. |year=2020 |title=Selection of optimum device parameters for permanent magnetic field generation |url=https://www.energyret.ru/jour/article/view/1625/696 |journal=Power Engineering: Research, Equipment, Technology |language=ru-RU |volume=22 |issue=6 |pages=176–187 |doi=10.30724/1998-9903-2020-22-6-176-187 |s2cid=233658494|doi-access=free}}</ref><ref>{{Cite journal |last1=Lukyanov |first1=O.E. |last2=Zolotov |first2=D.V. |year=2021 |title=Methodological support for the training of UAV designers and operators |url=https://journals.ssau.ru/vestnik/article/view/8633/pdf |journal=VESTNIK of Samara University. Aerospace and Mechanical Engineering |language=ru-RU |volume=20 |issue=1 |pages=14–28 |doi=10.18287/2541-7533-2021-20-1-14-28 |s2cid=236617894|doi-access=free}}</ref> PascalABC.NET is also built into a number of validation systems used for programming competitions.<ref>{{Cite web |title=ACMP Olympiad System |url=https://acmp.ru/article.asp?id_text=120 |url-status=live |archive-url=https://web.archive.org/web/20230327035528/https://acmp.ru/article.asp?id_text=120 |archive-date=2023-03-27 |access-date=2023-04-05}}</ref><ref>{{Cite web |title=Yandex Contest Compilers List |url=https://contest.yandex.ru/compilers/ |url-status=live |archive-url=https://web.archive.org/web/20230314174434/https://contest.yandex.ru/compilers/ |archive-date=2023-03-14 |access-date=2023-04-05 |website=Yandex Contest}}</ref>
 
In 2020, during anti-COVID lockdowns and home schooling period, PascalABC.NET website was ranked 3rd in Yandex traffic rating in the "Programming" category, and the number of downloads of the installation kit exceeded 10000 a day.<ref>{{Cite web |last=Kubysheva |first=Olga |date=2020-04-17 |title=PascalABC.NET: Sajt sistemy programmirovaniya, razrabatyvaemoj na mekhmate YUFU, podnyalsya v rejtinge YAndeksa na tret'e mesto [PascalABC.NET: Site of programming system developed at SFedU MMCS faculty climbed up to the third place in Yandex ranking] |url=https://www.rostov.kp.ru/online/news/3839814/ |website=Komsomol'skaya pravda |language=ru-RU}}</ref>
* Classes and interfaces
 
* [[Operator overloading]]
Though the core of the PascalABC.NET community is located in Russia, the language is also known in other countries such as Belarus,<ref>{{Cite journal |last=Kutysh |first=Aleksandr Z. |year=2018 |title=Razrabotka soderzhaniya vzaimosvyazannogo obucheniya budushchih uchitelej informatiki tekhnologiyam programmirovaniya [Development of interconnected training content for future computer science teachers in programming] |url=https://www.adu.by/images/2019/05/PedNauka_3(24)_2018.pdf |journal=Pedagogical Science and Education |language=ru-RU |issue=3 |pages=44–52}}</ref> Romania,<ref>{{Cite web |date=2020-01-21 |title=Practică în Pascal |url=https://www.youtube.com/playlist?list=PLP11T_LhFxPlQoxbZ1ZTlrv6AXDQjJJqB |website=YouTube}}</ref> Indonesia,<ref>{{Cite web |title=Mengenal PascalABC.NET |url=https://www.pascal-id.org/news/357/mengenal-pascalabc.net |url-status=live |archive-url=https://web.archive.org/web/20220810114037/https://www.pascal-id.org/news/357/mengenal-pascalabc.net |archive-date=2022-08-10 |access-date=2023-04-08}}</ref> Algeria.<ref>{{Cite web |date=2022-06-12 |title=PASCAL AND DELPHI TUTORIAL |url=https://www.youtube.com/playlist?list=PLmFVPmv0ntGNq-mu4vCT68I5ekJQj-Ocn |website=YouTube}}</ref>
* [[Exception handling]]
 
* [[Generic programming|Generic classes and routines]]
== Language syntax ==
* [[Garbage collection (computer science)|Garbage collection]]
 
=== Differences between Delphi and PascalABC.NET ===
 
==== New features ====
'''•''' <code>loop</code> statement<syntaxhighlight lang="delphi">
loop 10 do
Write('*');
</syntaxhighlight> '''•''' <code>for</code> loop with a step<syntaxhighlight lang="delphi">
for var i:=1 to 20 step 2 do
Print(i);
</syntaxhighlight> '''•''' <code>foreach</code> loop with an index<syntaxhighlight lang="delphi">
foreach var c in Arr('a'..'z') index i do
if i mod 2 = 0 then
Print(c);
</syntaxhighlight> '''•''' <code>a..b</code> ranges<syntaxhighlight lang="delphi">
(1..10).Printlines
</syntaxhighlight> '''•''' short function definition syntax<syntaxhighlight lang="delphi">
function Sum(a,b: real) := a + b;
</syntaxhighlight> '''•''' method implementation can be placed inside a class definition<syntaxhighlight lang="delphi">
type Point = class
x,y: real;
procedure Output;
begin
Print(x,y);
end;
end;
</syntaxhighlight> '''•''' <code>sequence of T</code> type as an abstraction of arrays, lists and sets<syntaxhighlight lang="delphi">
var seq: sequence of integer := Arr(1..10);
seq.Println;
seq := Lst(11..100); seq.Println;
seq := HSet(1..20); seq.Println;
</syntaxhighlight> '''•''' [[Anonymous function|lambda functions]]<syntaxhighlight lang="delphi">
var a := ArrGen(10,i -> i*i);
</syntaxhighlight> '''•''' auto classes - classes with an automatically generated constructor<syntaxhighlight lang="delphi">
type Point = auto class
x,y: real;
end;
var p := new Point(2,5);
</syntaxhighlight> '''•''' one-dimensional and multi-dimensional array slices<syntaxhighlight lang="delphi">
var m: array [,] of integer := MatrGen(3,4, (i,j) -> i+j+1);
Println(m); // [[1,2,3,4],[2,3,4,5],[3,4,5,6]]
Println(m[:2,1:3]); // [[2,3],[3,4]]
</syntaxhighlight>Some other features such as inline variable declarations, type inference, and <code>for</code> statement with a variable declaration are standard in the current version of Delphi. However, PascalABC.NET pioneered these features in 2007,<ref name=":2">{{Cite web |title=PascalABC.NET. What's New |url=https://pascalabc.net/chto-novogo |access-date=2023-04-09 |website=PascalABC.NET |language=ru-RU}}</ref> while in Delphi they were implemented in 2018.<ref>{{Cite web |last=Embarcadero Technologies |date=2018-11-21 |title=See What's New in RAD Studio 10.3 |url=https://www.youtube.com/watch?v=RreUFdxaR20&t=44s |website=YouTube}}</ref><ref>{{Cite web |title=Help for RAD Studio 10.3 Rio. What's New |url=https://docwiki.embarcadero.com/RADStudio/Rio/en/What%27s_New |access-date=2023-04-09 |website=Embarcadero. Product Documentation Wikis}}</ref>
 
==== Changed features ====
* strings in <code>case</code> statements
* sets based on arbitrary type: <code>set of string</code>
* constructors can be invoked with <code>new T(...)</code> syntax
* type extension methods instead of class helpers
* modules can be defined in a simplified form (without <code>interface</code> and <code>implementation</code> sections)
 
==== Not implemented features ====
* records with variant parts
* open arrays
* nested class definitions
* [[Inline assembler|inline assembly code]]
 
=== Functional style features ===
In PascalABC.NET, functions are [[First-class citizen|first-class objects]]. They can be assigned to variables, passed as parameters, and returned from other functions. Functional type is set in the form <code>T -> Res</code>.<ref>{{Cite book |last=Osipov |first=Alexander V. |title=PascalABC.NET: Vvedenie v sovremennoe programmirovanie [PascalABC.NET: Introduction to Modern Programming] |year=2019 |___location=Rostov-on-Don, Russia |pages=116–120 |language=ru-RU}}</ref> An [[anonymous function]] can be assigned to the variable of this type:
<syntaxhighlight lang="delphi">
## // denotes that the main program will be written without enclosing begin-end
Line 93 ⟶ 119:
Print((Cos*f)(2));
</syntaxhighlight>
In the book "How To Program Effectively In Delphi"<ref>{{Cite book |author=Kevin R. Bond |title=How to Program Effectively in Delphi for AS/A Level Computer Science |publisher=Educational Computing Services Ltd |year=2021 |isbn=9780992753603 |chapter=Chapter 44. Anonymous methods}}</ref> and in the corresponding video tutorials,<ref name=":0">{{Cite web |author=Kevin Bond |title=How to Program Effectively in Delphi. Lesson 44. Part 1 |url=https://www.youtube.com/watch?v=RBlg-ItyyTA&t=377s |access-date=2023-04-04 |website=YouTube |langdate=10 February 2022 |language=en}}</ref><ref>{{Cite web |title=Delphi Boot Camp 2022 - Delphi and functional programming using anonymous methods |url=https://www.youtube.com/watch?v=OmregYuqLU8&t=1640s |access-date=2023-04-04 |website=YouTube |lang date=28 August 2022 |language=en}}</ref>, Dr. Kevin Bond, a programmer and a Computer Science teaching specialist,<ref>{{Cite web|langlanguage=en|url=https://www.educational-computing.com/DelphiBook/KRBsBriefBiography.pdf|title=Brief biography Dr Kevin R Bond|website=Educational Computing Services Ltd|access-date=4 April 2023|archive-date=4 April 2023|archive-url=https://web.archive.org/web/20230404131810/https://www.educational-computing.com/DelphiBook/KRBsBriefBiography.pdf|url-status=dead}}</ref>, notes that PascalABC.NET has powerful functional programming capabilities which are missing in Delphi. As an example, [[Partial application|partial function application]] is demonstrated:<syntaxhighlight lang="delphi">
##
var f: real -> real -> real := x -> y -> x + y;
 
Print(f(2)(3));
</syntaxhighlight>
 
== Use in school and higher education ==
 
Designed for education, PascalABC.NET remains the most common programming language in Russian schools and one of the recommended languages for passing the [[Unified State Exam]] on informatics<ref>{{Cite web |title=Metodicheskie rekomendacii po podgotovke i provedeniyu edinogo gosudarstvennogo ekzamena po informatike i IKT v komp'yuternoj forme v gorode Moskve v 2021 godu [Guidelines for the preparation and conduct of the unified state exam in computer science and ICT in the city of Moscow in 2021] |url=http://rcoi.mcko.ru/resources/upload/RichFilemanager/documents/2020-2021/org_metod/11/mr_kege_inf_2021.pdf |publisher=Departament obrazovaniya i nauki goroda Moskvy [Department of Education and Science of Moscow] |page=110 |language=ru-RU}}</ref><ref>{{Cite web |last=Polyakov |first=Konstantin |title=Doklady na konferenciyah i seminarah [Reports at conferences and seminars] |url=https://kpolyakov.spb.ru/school/doklad.htm |language=ru-RU}}</ref><ref>{{Cite web |last=Bogdanov |first=Alexey |date=2022-10-04 |title=PascalABC.Net or Python/ C#/C++ |url=https://www.youtube.com/watch?v=RulhCYnbRAA |access-date=2023-04-05 |website=YouTube |language=ru-RU}}</ref>. In the Southern Federal University, it is used as the first language for teaching students majoring in computer science, and for teaching children in one of the largest computer schools in Russia<ref>{{Cite news |last=Popova |first=Ekaterina |date=2022-09-06 |title=Kak v Rostove gumanitarii uspeshno obuchayutsya IT-special'nostyam [How humanitarians successfully study IT specialties in Rostov] |language=ru-RU |work=Komsomolskaya Pravda |url=https://www.rostov.kp.ru/daily/27441/4643617/}}</ref>. PascalABC.NET is also widely used as a basic programming language in pedagogical universities for the training of computer science teachers.<ref name="MathAnim">{{cite web |last1=Dzhenzher |first1=V.O. |last2=Denisova |first2=L.V. |title=Mathematical animation in computer simulation at school |url=https://www.sciencegate.app/document/10.32517/2221-1993-2019-18-6-51-54 |access-date=4 April 2023 |website=www.sciencegate.app |publisher=Informatics in school, 2019; (6) |pages=51-54 |doi=10.32517/2221-1993-2019-18-6-51-54}}</ref>
<ref name="HammingCode">{{cite web |last1=Dzhenzher |first1=V.O. |last2=Denisova |first2=L.V. |title=Implementation of the Hamming code on PascalABC.NET while studying the theoretical foundations of informatics |url=https://www.sciencegate.app/document/10.32517/2221-1993-2021-20-9-27-36 |access-date=4 April 2023 |website=www.sciencegate.app |publisher=Informatics in school, 2021; 1(9) |pages=29-38 |doi=10.32517/2221-1993-2021-20-9-27-36}}</ref>
<ref name="SciGraph">{{cite web |last1=Dzhenzher |first1=V.O. |last2=Denisova |first2=L.V. |title=Scientific graphics in PascalABC.NET: plotting function graphs in a rectangular cartesian coordinate system |url=https://www.sciencegate.app/document/10.32517/2221-1993-2020-19-1-31-39 |access-date=4 April 2023 |website=www.sciencegate.app |publisher=Informatics in school. 2020; (1) |pages=31-39 |doi=10.32517/2221-1993-2020-19-1-31-39}}</ref>
[[File:Turtle Dawing Unit of PascalABC.NET.png|thumb|An example of a geometric figure drawn with the TurtleWPF unit]]
PascalABC.NET has built-in units aimed at teaching children of primary and secondary school age: GraphWPF (raster graphics), WPFObjects (vector graphics), Graph3D (3D graphics and animation), Robot, Drawman and TurtleWPF (for beginners).These units represent a higher abstraction level allowing beginners not to focus on technical aspects of drawing.
The figure shown is drawn with the following code:<syntaxhighlight lang="delphi">
uses TurtleWPF;
 
begin
Down; var f: integer -> integer -> integer := x -> y -> x + // prepare turtle's peny;
Writeln(f(2)(6));
SetSpeed(11); // set turtle's movement speed
SetColor(Colors.Red); // set pen color
for var i:=1 to 450 do
begin
SetColor(RGB(128+i,0,i)); // change pen color
Forw(i); // move turtle forward
Turn(96); // rotate turtle clockwise
end;
end.
</syntaxhighlight>
</syntaxhighlight>PascalABC.NET is also built into a number of validation systems used for programming competitions<ref>{{Cite web |title=ACMP Olympiad System |url=https://acmp.ru/article.asp?id_text=120 |url-status=live |archive-url=https://web.archive.org/web/20230327035528/https://acmp.ru/article.asp?id_text=120 |archive-date=2023-03-27 |access-date=2023-04-05}}</ref><ref>{{Cite web |title=Yandex Contest Compilers List |url=https://contest.yandex.ru/compilers/ |url-status=live |archive-url=https://web.archive.org/web/20230314174434/https://contest.yandex.ru/compilers/ |archive-date=2023-03-14 |access-date=2023-04-05 |website=Yandex Contest}}</ref>.
 
== Programming styles and codeCode examples ==
PascalABC.NET is a multi-paradigm programming language. It allows one to use different coding styles from oldschool Pascal to functional and object-oriented programming. The same task can be solved in different styles as follows:<ref>{{Cite web |title=PascalABC.NET programming styles |url=https://pascalabcnet.github.io/mydoc_progr_styles.html |access-date=2023-04-09}}</ref>
 
=== Oldschool style ===
<syntaxhighlight lang="delphi">
var a,b,i,sum: integer; // variables definition preceeds the main program body
begin
Read(a,b);
sum := 0;
for i:=a to b do
sum := sum + i*i;
Write('Sum = ',sum)
end.
</syntaxhighlight>
 
=== EquivalentUsual PascalABC.NET style ===
<syntaxhighlight lang="delphi">
begin
Line 202 ⟶ 193:
</syntaxhighlight>
 
== Code auditCriticism ==
Though PascalABC.NET is actively used for teacher training,<ref name=":4"/><ref name="MathAnim"/><ref>{{Cite journal |last1=Dzhenzher |first1=V.O. |last2=Denisova |first2=L.V. |year=2022 |title=Dynamic arrays and lists in PascalABC.NET |url=https://school.infojournal.ru/jour/article/view/614/611 |journal=Informatics in School |language=ru-RU |issue=1 |pages=67–80|doi=10.32517/2221-1993-2022-21-1-67-80 |s2cid=249662060 |doi-access=free}}</ref><ref>{{Cite web |title=Nauchno-metodicheskaya konferenciya «Ispol'zovanie sistemy programmirovaniya PascalABC.NET v obuchenii programmirovaniyu» (29-30 marta 2023 g.) [Scientific and methodical conference "Using PascalABC.NET programming system in teaching programming" (March 29-30, 2023)] |url=http://mmcs.sfedu.ru/registration/28-PABCConf2023 |access-date=2023-04-10 |website=Institute of Mathematics, Mechanics, and Computer Science |language=ru-RU}}</ref> some members of the teaching community ignore difference between historically used Turbo Pascal and PascalABC.NET, criticizing some unspecified "Pascal" language for being far from modern programming, too wordy and not simple enough to be used as the first programming language.<ref>{{Cite journal |last1=Panova |first1=I.V. |last2=Kolivnyk |first2=A.A. |year=2020 |title=Methodological Aspects of Teaching Python Programming in the School Informatics Course |journal=Informatics in School |language=ru-RU |issue=6 |pages=47–50|doi=10.32517/2221-1993-2020-19-6-47-50 |s2cid=225133880|doi-access=free }}</ref><ref>{{Cite web |date=2021-05-28 |title=What's wrong with modern computer science teaching |url=https://habr.com/ru/companies/skillfactory/articles/559010/ |access-date=2023-04-08 |website=Habr |language=ru-RU}}</ref> They consider Python to be the best starting point, as it is more concise and practically applicable. Their opponents, including  PascalABC.NET developers themselves, argue that it is incorrect to put an equal sign between the classic Pascal and PascalABC.NET, as the latter contains lots of modern multi-paradigm features, including the ones from Python.<ref name=":3"/><ref>{{Cite web |last=Bragilevsky |first=Vitaly |date=2020-04-14 |title=The First Programming Language Dispute: The Final Solution |url=https://www.youtube.com/watch?v=OtcKHgkPiyk&t=2318s |website=YouTube |publisher=JetBrains}}</ref><ref>{{Cite web |last=Polyakov |first=Konstantin |date=2021-08-24 |title=New features in PascalABC.NET |url=https://kpolyakov.spb.ru/download/pas2021.ppt |place= |language=ru-RU}}</ref> PascalABC.NET allows students to write as concise and expressive programs as Python,<ref>{{Cite web |last=Mikhalkovich |first=Stanislav |date=2021-11-22 |title=Comparing Python and PascalABC.NET |url=https://www.youtube.com/watch?v=ZcWP82JBqZI |website=YouTube}}</ref> and acts as a "bridge to production programming" by applying a static typing concept.<ref name=":3"/> PascalABC.NET is also a compilable language, which makes it easier to learn programming, because all semantic errors are caught at compile time rather than occur unpredictably at runtime.<ref name=":3"/><ref>{{Cite book |last=Osipov |first=Alexander V. |title=PascalABC.NET: vybor shkol'nika. CHast' 1. [PascalABC.NET: Schoolchildren's Choice. Part 1] |publisher=Southern Federal University |year=2020 |edition=2nd |pages=16–19 |language=ru-RU}}</ref>
In 2017<ref>{{Cite web|lang=en|url=https://pvs-studio.com/en/blog/posts/csharp/0492/|title=Analysis of PascalABC.NET using SonarQube plugins: SonarC# and PVS-Studio|website=PVS-Studio|date=2017-03-29}}</ref> and 2022<ref>{{Cite web|lang=en|url=https://medium.com/pvs-studio/re-checking-pascalabc-net-f8bfc94aba3c|title=Re-checking PascalABC.NET|website=Medium|date=2022-02-11}}</ref>, independent audit of [https://github.com/pascalabcnet/pascalabcnet PascalABC.NET public repository] was conducted. Based on the results of the static check, potentially dangerous code fragments were listed that require additional analysis by developers. It was also noted that the overall quality of the code could be improved. To do this, code duplication and redundant checks should be eliminated, and refactoring should be performed more carefully.
Pascal is often regarded as a strictly structured programming language, which makes it a popular choice for introductory programming education. However, some authors argue that the promotion of Python as a beginner-friendly language is driven, in part, by commercial interests.
 
== See also ==
* [[Object Pascal]]
* [[C Sharp (programming language)|C#]]
 
== References ==
{{reflistReflist}}
 
== External links ==
* {{Official website|http://pascalabc.net/en}}
* [https://github.com/pascalabcnet/{{GitHub|pascalabcnet |PascalABC.NET Github Repository]}}
* [https://t.me/pascalabc_official Official Telegram Channel ''PascalABC.NET'']
 
 
{{Pascal programming language family}}
Line 227 ⟶ 214:
[[Category:Pascal (programming language) compilers]]
[[Category:Pascal programming language family]]
[[Category:Educational programming languages]]
[[Category:Statically typed programming languages]]
[[Category:Linux integrated development environments]]
[[Category:Free integrated development environments]]