Forum > FPC development

Possible future competition for Delphi and FPC?

(1/3) > >>

SlightlyOutOfPhase:
.

CCRDude:
From something called "professionally written", I would expect file headers. Would make it much easier for the reader to understand the basic structure of the repo.
I would also expect some kind of documentation, "docs/" is just external information used, and "features.txt" is in cyrillic letters, and Google Translate only reveals attributes as something worth noting. I see in your post history that you're unhappy about FPC not supporting attributes, but I mostly see many features that are not listed in the translation.
I see references to JS, LLVM and execution VMs, but all this seems to be external.
And I see that it seems to use CodeTyphon for testing, instead of pure Lazarus. Since CT is based on Lazarus, it would make much more sense to test it with Lazarus first.

Finally, keep in mind that any advanced IT student can write a simple compiler, but Delphi and FPC are much more than that (take a look at their rich RTLs).

I could try to see it from a different perspective, but if you raise the bar that high, disappointment is a logical first reaction ;)

marcov:
Instead of posting here some empty message, why don't you post your testing results with e.g. Delphi or FPC sources?

From what I can see it is a parser more than a compiler with an incomplete virtual machine.

Thaddy:
Rather nice, but not very good code:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function Sign(I: Integer): Integer; inline; // faster then Math.Sign.begin  if I < 0 then    Sign := -1  else if I > 0 then    Sign := +1  else    Sign := 0;end;
That does not look too good when a proper student would probably write something like this:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function sign(const i:integer):integer;begin Result := integer(i > 0) - integer(i < 0); // casts are cheap..end;Which is branchless....

There are more first look issues...

wp:

--- Quote from: Thaddy on December 14, 2018, 11:24:30 am ---
--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---function Sign(I: Integer): Integer; inline; // faster then Math.Sign.begin  if I < 0 then    Sign := -1  else if I > 0 then    Sign := +1  else    Sign := 0;end;
--- End quote ---
A question regarding the comment "faster than Math.Sign": Why is this code supposed to be faster than the one which I just copied out of Math.pas?

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Type  TValueSign = -1..1; const  NegativeValue = Low(TValueSign);  ZeroValue = 0;  PositiveValue = High(TValueSign); function Sign(const AValue: Integer): TValueSign;inline;begin  If Avalue<0 then    Result:=NegativeValue  else If Avalue>0 then    Result:=PositiveValue  else    Result:=ZeroValue;end;  

Navigation

[0] Message Index

[#] Next page

Go to full version