📜 ⬆️ ⬇️

Some reasons to forget PascalABC.Net

Introduction


The times of the good old and Pascal are over. The time has come for new development environments for this language. There are many dialects of this language. Although they all had something in common. Today we will talk about the PascalABC.Net dialect and why you should give it up if you seriously want to do programming and think that this is your future.

First look


Imagine that you are new. Even if it is not. Imagine that you first came to the world of programming and the first thing you are given to learn is the Pascal language. And they say, of course, to write in the environment PascalABC.Net. Well, you sit down and begin to slowly learn the language itself. Your skill rises and you want to learn something new more and more. And now you are not the newcomer who you were at the beginning, but a person with an average level of programming knowledge. And starting from this very moment you begin to feel some discomfort when working at PascalABC.Net. And the further the learning of the language and the .Net platform progresses, the stronger you feel that writing becomes not very convenient. You begin to notice some instability of the IDE itself. By the way, you probably already encountered a problem when pressing Ctrl + Z - crashing an error in PascalABC.Net itself when trying to cancel some action, after which it was out of the question to edit the code. This is only one of the few problems with which you have to get acquainted.

And what next?


And then the fun begins. Have you ever used when working generalizations? If not, then it is worth doing, since it is here that you will encounter many pitfalls, and, for sure, this will turn your positive opinion about PascalABC.Net to the opposite. For example:

type
  ft = () -> integer;

begin
  var f: ft := () -> 0;
  var a := Arr(0).Select&<integer,  ft>(i -> f);
end.

ft, ( — ). Select . , a , sequence of ft, sequence of integer. Select , ft TResult ( ). IDE. ? .


, . , . . — C#, PascalABC.Net ( ). , () TA, T. — TB, - T2.

type
  TA<T> = auto class
    X: T;
  end;
  
  TB<T, T2> = class(TA<T>)
    Y: T2;
    constructor Create(x: T; y: T2) := (self.X, self.Y) := (x, y);
  end;

begin
end.

. . :
Internal compiler error in module [pabcnetc.exe] :'System.Exception: System.NullReferenceException: .
PascalABCCompiler.NETGenerator.ILConverter.ConvertCommonGenericInstanceTypeMembers(ICommonGenericTypeInstance value)
PascalABCCompiler.NETGenerator.ILConverter.ConvertFromTree(IProgramNode p, String TargetFileName, String SourceFileName, CompilerOptions options, String[] ResourceFiles)
PascalABCCompiler.Compiler.Compile()'
? . Issue. : .


, ? ? , , , PascalABC.Net. :

type
  TA = class
    property Prop1: real read 0 write begin end;
  end;

begin end.

Ctrl+Shift+F ( ) :

type
  TA = class
    property Prop1: real read function#GetGen2(real read 00write 
  
  procedure#SetGen1(valuereal read 0 write begin endbegin endproperty 
  
  Prop1: real read#GetGen2 0 write#SetGen1;
end;
  TA = class
    property Prop1: real read 0 write begin end;
  end;

begin end.

, — . . , Ctrl+Z, , .


-, . ? , , . , Ctrl+Z, — , - :
. .
. , . , ( ), . , .

, ?


— C#, Microsoft , PascalABC.Net .


, , , , PascalABC.Net C# — , ( , , IDE ).

P.S. , . ( ).

')

Source: https://habr.com/ru/post/417229/


All Articles