պասկալ

թանաքեան

փետրուար 17, 2023

էդ ի՞նչ ա

one mountain BCPL

c++

other mountain: Lisp, ML, Smalltalk, and CLU

other mountain

If the implementer doesn’t take steps to avoid it, as simple a statement as n := n + 1 could require an allocation, a method lookup, or both. Good implementations avoid most of the cost, and languages in this family have been used successfully for systems programming. But their general disposition towards heap allocation rather than stack allocation remains, and they have not become popular with systems programmers.

between the extremes

between the extremes

a bit on m3

m3

պարզութիւն

from m3 introduction

գրադարան

source

implementations

src src2

lisa pascal

src

iso pascal

բարեբախտաբար ոչ ոք չի հետաքրքրւում ու iso կոմիտէն լաւ ա աշխատել standards faq

Ada 83 -> Ada95

աղբիւր

Ada OOP

աղբիւր

Ada OOP

այլ աղբիւր

Ադայի ստեղծողներն հպարտանում էին, որ աւելացրել են ՕԿԾ

լեզուի մէջ ընդամէնը 6 բառ աւելացնելով։

Վիրտը թափել ա բառեր եւ հասկացութիւններ modula-2֊ից ստանալով աւելի ճկուն եւ հզօր լեզու՝ Oberon֊ը։

լեզուների բարդութիւնը

աղբիւր - արդե՞օք կարող ենք սկսել ծրագրաւորել report֊ը կարդալուց յետոյ։ - եթէ գիտենք ծրագրաւորումն ինչ ա։

complexity

sources:

ծրագրաւորման լեզուներ եւ տրանսլեացիայի մեթոդներ Ս․ Սուերդլով։

less is more, why oberon beats mainstream in complex applications

վերեւի սլայդերին վերաբերող թուղթ ֆ․ տկաչեօվ։

apple version

program ObjectPascalExample;

   type
      THelloWorld = object
         procedure Put;
      end;

   var
      HelloWorld: THelloWorld;

   procedure THelloWorld.Put;
   begin
      ShowMessage('Hello, World!');
   end;

begin
   New(HelloWorld);
   HelloWorld.Put;
   Dispose(HelloWorld);
end.

turbo pascal version (stack)

program ObjectPascalExample;

   type
      THelloWorld = object
         procedure Put;
      end;

   procedure THelloWorld.Put;
   begin
      WriteLn('Hello, World!');
   end;

var
  HelloWorld: THelloWorld; { allocated on the stack and can be used without explicit allocation. }
begin
   HelloWorld.Put;
end.

turbo pascal version (heap)

program ObjectPascalExample;

   type
      PHelloWorld = ^THelloWorld;
      THelloWorld = object
         procedure Put;
      end;

   procedure THelloWorld.Put;
   begin
      WriteLn('Hello, World!');
   end;

var
  HelloWorld: PHelloWorld; { this is a typed pointer to a THelloWorld }

begin
   New(HelloWorld);
   HelloWorld^.Put;
   Dispose(HelloWorld);
end.

delphi & fpc

program ObjectPascalExample;

type
  THelloWorld = class
    procedure Put;
  end;

procedure THelloWorld.Put;
begin
  Writeln('Hello, World!');
end;

var
  HelloWorld: THelloWorld;               { this is an implicit pointer }

begin
  HelloWorld := THelloWorld.Create;      { constructor returns a pointer to an object of type THelloWorld }
  HelloWorld.Put;
  HelloWorld.Free;                       { this line deallocates the THelloWorld object pointed to by HelloWorld }
end.

աղբիւր

#մոդուլներ

headers/classes/namespaces are not modules

definition

encapsulation

թաղանթապատումը սովորում են օկծ սովորելիս

մինչդեռ այն գոյութիւն է ունեցել մինչ այդ

լռելեայն՝ մոդուլի միջի ֆունկցիաներն ու տուեալները փակ են

անհրաժեշտ ա լինում դարձնել դրսից տեսանելի միայն ինտերֆէյսը

ի տարբերութիւն՝ c֊ում պահանջւում է անել հակառակը՝ անցնել բոլոր ֆունկցիաներով եւ փակել

initialization order

Another often cited criticism of C++, the missing initialization order, also solved by Oberon’s modules. In contrast of cpp’s include mechanism, the import relationship forbids cycles. Thus, the imported modules can always be initialized before their clients.

separation of safe and dangerous code

ամենակարեւոր հատկութիւններից ա՝ SYSTEM բառով մոդուլ նշելը

դա ստիպում է առանձնացնել վտանգաւոր կոդը, եւ լոկալիզացնել այն։

բոլոր մոդուլները որ չեն պարունակում SYSTEM բառը՝ տեղափոխելի են։

modules vs java packages

Modules vs. Java packages

Java has the notion of a package. Classes belonging to the same package may acc ess non-public members of each other. The same can be said of Modula-2 or Oberon Modules. Within a module boundary, no restriction exists, while only explicitly exported types, variables and procedures can be accessed from outside a module.

But there is a fundamental difference between the Modules and Java packages. Th e Module is also the basic compilation unit. Thus when you collect things into a module, you know, that they are protected from outside interferences. Java choo se to elect the class as basic compilation unit. Thus everybody may add classes to a package, and you loose the protection against outsiders.

աղբիւր

fpc որակ

fpc որակ

# books

brinch hansen on pascal compilers

# software tools in pascal

creenshaw

աղբիւր

pascal implementation

pascal implementation book

criticism

աղբիւր

my criticism

language lineage

sverdlov

power saving

src # comparison

features

closures properties & events

implementation of fpc

no glibc

inline variables

marco cantu blog lazarus forum discussion

c++ builder

c++ became so complicated that embarcadero gave up developing own c++ compiler they apply patches to clang’s compiler cppcast link

cpp delegates in builder my blog post on this

apple lisa

apple lisa

photoshop

photoshop source code

photoshop source code

photoshop source code

crossplatform app

android app

software written in pascal

total commander tuxcmd # lazarus is community choice on sourceforge in 2019 lazarus - community choice

ֆրանսիայի կառավարութեան ցանկ

ցանկ — պարունակում ա fpc & lazarus

swag

link

other sw written in pascal

https://wiki.freepascal.org/Lazarus_Application_Gallery https://wiki.freepascal.org/FPC_Applications/Projects_Gallery https://wiki.freepascal.org/Projects_using_Lazarus https://delphi.fandom.com/wiki/Good_Quality_Applications_Built_With_Delphi http://www.edm2.com/index.php/Category:Software_written_in_Pascal

ու տէնց