Recent

Author Topic: The future of Free Pascal  (Read 228505 times)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1186
    • Burdjia
Re: The future of Free Pascal
« Reply #360 on: July 10, 2017, 09:22:17 am »
I tend to think the task would require writing another compiler without backward compatibility.
Then it will not be Pascal but another language (i.e. Modula, Oberon...).  ::)

Actually the big advantage of FPC (and also Delphi) is its high backward compatibility.  You can compile programs designed for very old compilers (such as Turbo Pascal 1.0 or Delphi 1) with very little changes.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: The future of Free Pascal
« Reply #361 on: July 10, 2017, 10:10:27 am »
What's wrong with
Code: Pascal  [Select][+][-]
  1. f:=open("file.txt")
?
Double quotes... :D
Specialize a type, not a var.

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: The future of Free Pascal
« Reply #362 on: July 10, 2017, 10:18:10 am »
In general, note that within the limitations of a strongly typed language several python like constructs are already possible or will be possible in the near future.
The needed features for e.g. automatic memory management are either already there (use instantiation to interface variables, not class variables) or under active development (arc support, smartpointers).
Specialize a type, not a var.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: The future of Free Pascal
« Reply #363 on: July 10, 2017, 10:59:52 am »
OK. I don't see it then. Keep in mind that the main force that keeps pascal alive this days is compatibility if I'm to forgo compatibility and rewrite my libraries I'll target a more popular toolchain like c++ I have no reason to stay cornered.

I don't see it either. The challenges of programming nowadays are not due to a lack of language syntax micro optimization.  This is syntax navel-gazing, or syntax graffiti; people feel a need to mark a language as their own by adding something. And if you search long enough you'll find always some construct that can be a few chars shorter. But it makes the language as a whole more baroque and thus weaker.

AlexK

  • Jr. Member
  • **
  • Posts: 55
Re: The future of Free Pascal
« Reply #364 on: July 10, 2017, 11:08:00 am »
I tend to think the task would require writing another compiler without backward compatibility.
Then it will not be Pascal but another language (i.e. Modula, Oberon...).  ::)

Actually the big advantage of FPC (and also Delphi) is its high backward compatibility.  You can compile programs designed for very old compilers (such as Turbo Pascal 1.0 or Delphi 1) with very little changes.

True. I implied that more likely nobody would implement it in FPC, not that it breaks backward compatibility.
Golang is criticized for minimalism, procedures attached to structures(records), but Oberon is even more minimalist.

bylaardt

  • Sr. Member
  • ****
  • Posts: 309
Re: The future of Free Pascal
« Reply #365 on: July 12, 2017, 04:32:44 am »

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: The future of Free Pascal
« Reply #366 on: July 12, 2017, 07:08:05 am »
In case you're wondering, I believe the bugs related to tooltips showing the wrong variable values when the mouse was hovered over the variable names.
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: The future of Free Pascal
« Reply #367 on: July 12, 2017, 10:02:36 am »
what happened to the danish language?  O:-)
Dansk bacon er supior til Britisk bacon.
Specialize a type, not a var.

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: The future of Free Pascal
« Reply #368 on: July 12, 2017, 11:33:37 am »
Anyway, we showed examples that do no necessarily do what the programmer wants
Specialize a type, not a var.

AlexK

  • Jr. Member
  • **
  • Posts: 55
Re: The future of Free Pascal
« Reply #369 on: July 14, 2017, 03:59:08 pm »
I've worked a little on implementing syntax highlighting for an FPC mode in Emacs.
It turns out that Delphi's idiosyncrasies spoiled the language in some parts.
For example, calling a proc/func without parenthesis: http://s5.postimg.org/oszmu72vb/fpc_mode_emacs.jpg

OBJFPC style guidelines fix that, but are not enforced.
It seams to me that such a language may replace C in open source.
« Last Edit: July 14, 2017, 04:11:07 pm by AlexK »

Thaddy

  • Hero Member
  • *****
  • Posts: 14204
  • Probably until I exterminate Putin.
Re: The future of Free Pascal
« Reply #370 on: July 14, 2017, 05:22:44 pm »
 Apart from the fact I had to adapt my ad blocker because of some careless image hosting >:( >:( >:( >:(  (http://s5.postimg.org/oszmu72vb/fpc_mode_emacs.jpg)
Those are not Delphi deficiencies but half-baked parser issues on the emacs side....
Delphi has parser issues, but that's not one of them.

(Try to parse Delphi 7 's system.pas or windows.pas in FPC to find some real parser issues...  8-) )
« Last Edit: July 14, 2017, 05:26:14 pm by Thaddy »
Specialize a type, not a var.

AlexK

  • Jr. Member
  • **
  • Posts: 55
Re: The future of Free Pascal
« Reply #371 on: July 14, 2017, 06:56:58 pm »
Those are not Delphi deficiencies but half-baked parser issues on the emacs side....
Delphi has parser issues, but that's not one of them.
(Try to parse Delphi 7 's system.pas or windows.pas in FPC to find some real parser issues...  8-) )

You are ignorant.
In Delphi "there is no difference between a function result and a variable, however there is in FPC":
http://wiki.freepascal.org/Code_Conversion_Guide#When_calling_a_procedure_variable_use_this_syntax:_theprocname.28.29

It's not a "half-baked parser issues on the Emacs side" because I didn't even start to write a parser(Semantic built-in lib in Emacs). Only a quick automatic fontification so far.

I don't know yet what pushed Delphi programmers to make the language more context dependent by omitting parenthesis for function calls without arguments. It seams like a C++ way.
« Last Edit: July 14, 2017, 07:07:30 pm by AlexK »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: The future of Free Pascal
« Reply #372 on: July 14, 2017, 07:33:48 pm »
It seams to me that such a language may replace C in open source.
I wish. Anyway, it made me smile today. Thank you!  :D
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: The future of Free Pascal
« Reply #373 on: July 14, 2017, 07:36:07 pm »
You are ignorant.
In Delphi "there is no difference between a function result and a variable, however there is in FPC":

There is in some parser modes. The opinions about that vary.

Quote
http://wiki.freepascal.org/Code_Conversion_Guide#When_calling_a_procedure_variable_use_this_syntax:_theprocname.28.29

It's not a "half-baked parser issues on the Emacs side" because I didn't even start to write a parser(Semantic built-in lib in Emacs). Only a quick automatic fontification so far.

Halfbaked "Semantic built-in lib in Emacs" then.

Quote
I don't know yet what pushed Delphi programmers to make the language more context dependent by omitting parenthesis for function calls without arguments. It seams like a C++ way.

Delphi's predecessor already had it.   Parenthesis don't make a function call a function call. Pascal is a typed language, the fact that identifier is a function makes it a function call.

The FPC mode forces it to solve some rare ambiguity case. Not for syntax highlighters benefit.

Blestan

  • Sr. Member
  • ****
  • Posts: 461
Re: The future of Free Pascal
« Reply #374 on: July 14, 2017, 07:42:06 pm »
Quote
You are ignorant
nowi will get some.gin/tonic and wait for thaddy's reaponse and i will enjoy your slow convultions   :D
Speak postscript or die!
Translate to pdf and live!

 

TinyPortal © 2005-2018