Content deleted Content added
m →History of PascalABC.NET: Typo |
Rescuing 1 sources and tagging 0 as dead.) #IABot (v2.0.9.5 |
||
(29 intermediate revisions by 16 users not shown) | |||
Line 1:
{{Short description|Computer programming language}}
{{Use dmy dates|date=September 2016}}
{{Infobox programming language
| name = PascalABC.NET
| logo =
| screenshot =
| paradigm = [[Multi-paradigm programming language|Multi-paradigm]]: [[
| year = {{Start date and age|2007|df=yes
| designer = PascalABC.NET Compiler Team
|
| latest release version = 3.8.3.3255
| latest release date = {{Start date and age
| typing = [[Static type|Static]], [[Type inference|partially inferred]]
| influenced by = [[Delphi (
|
| license = [[GNU Lesser General Public License|LGPLv3]]
| website = {{URL|pascalabc.net/en
|
}}
'''PascalABC.NET''' is a [[High-level programming language|high-level]] [[General-purpose programming language|general-purpose]] [[programming language]] supporting multiple paradigms. PascalABC.NET is based on [[Delphi (
PascalABC.NET is implemented for the [[.NET
== History 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=
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 |
== 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 |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
In 2020, during anti-COVID lockdowns and home schooling period, PascalABC.NET website was ranked
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
== Language syntax ==
Line 77 ⟶ 74:
end;
var p := new Point(2,5);
</syntaxhighlight> '''•''' one-
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
==== Changed features ====
Line 97 ⟶ 94:
=== 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.
<syntaxhighlight lang="delphi">
## // denotes that the main program will be written without enclosing begin-end
Line 122 ⟶ 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 |
begin
var f:
end.
</syntaxhighlight>
== Code examples ==
▲Print(f(2)(3));
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>
=== Usual PascalABC.NET style ===
<syntaxhighlight lang="delphi">
begin
var (a,b) := ReadInteger2; // read input into tuple of two variables
var sum := 0; // type auto-inference
for var i:=a to b do
sum += i*i;
Print($'Sum = {sum}') // string interpolation
end.
</syntaxhighlight>
=== Procedural style ===
<syntaxhighlight lang="delphi">
function SumSquares(a,b: integer): integer;
begin
Result := 0;
for var i := a to b do
Result += i * i
end;
begin
var (a,b) := ReadInteger2;
Print($'Sum = {SumSquares(a,b)}')
end.
</syntaxhighlight>
=== Functional style ===
This solution uses .NET extension methods for sequences and PascalABC.NET-specific range <code>(a..b)</code>.<syntaxhighlight lang="delphi">
begin
var (a,b) := ReadInteger2;
(a..b).Sum(x -> x*x).Print // method chaining with lambda expressions
end.
</syntaxhighlight>
=== Object-oriented style ===
This solution demonstrates PascalABC.NET-specific short function definition style.<syntaxhighlight lang="delphi">
type Algorithms = class
static function SumSquares(a,b: integer) := (a..b).Sum(x -> x*x);
static function SumCubes(a,b: integer) := (a..b).Sum(x -> x*x*x);
end;
begin
var (a,b) := ReadInteger2;
Println($'Squares sum = {Algorithms.SumSquares(a,b)}');
Println($'Cubes sum = {Algorithms.SumCubes(a,b)}')
end.
</syntaxhighlight>
=== Close to regular C# style ===
It is possible to write programs without usage of PascalABC.NET standard library. All standard .NET Framework classes and methods can be used directly.<syntaxhighlight lang="delphi">
uses System; // using .NET System namespace
begin
var arr := Console.ReadLine.Split(
new char[](' '),
StringSplitOptions.RemoveEmptyEntries
);
var (a,b) := (integer.Parse(arr[0]),integer.Parse(arr[1]));
var sum := 0;
for var i:=a to b do
sum += i*i;
Console.WriteLine($'Sum = {sum}')
end.
</syntaxhighlight>
== Criticism ==
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>
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.
== References ==
{{
== External links ==
* {{Official website|
*
* [https://t.me/pascalabc_official Official Telegram Channel ''PascalABC.NET'']
{{Pascal programming language family}}
Line 147 ⟶ 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]]
|