Recent

Author Topic: NIL vs. Assign: when to use - or: what are the differences ?  (Read 9777 times)

Khrys

  • Sr. Member
  • ****
  • Posts: 391
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #45 on: March 31, 2025, 07:48:17 am »
It does not matter whether your English is good or bad, please only use English in the international part of the forum or at least also  provide a translation (e.g. by Google Translate). If you prefer German then use the German Lazarus Forum instead.

Please don't target  @paule32,  it was me who requested a response in German ("Könntest du das bitte auf Deutsch wiederholen?" means "Could you please repeat that in German?").
The onus to provide a translation is on me, if anything:

Hallo,

Bitte vergebt mir mein Englisch - es ist schlecht, ja ich weiß - es ist nicht meine Hauptsprache und Englisch kenne ich nur von der Schule her, nicht jedoch als Expert mit englisch sprachlichen Potential.

Mit CLOS meinte ich Closure, was ich in Verbindung mit LISP her kenne, und auch meine bei JavaScript mal gelesen zu Haben.
Bei diesen Sprachen kann man Lambda-Funktionen verwenden, um seinen Code übersichtlicher zu gestalten.
Übersichtlich hier jedoch mit Vorsicht zu genießen, weil ein C++ Programmierer etwas anderes über übersichtlich versteht als ein alter Hase, der LISP programmiert.
Gleiches gilt dann natürlich für andere Sprachen auch.

Das ganze ist mir im Kopf umhergeschwirrt, weil in einen älteren Artikel hier in diesen Thread sich über "Klammern" ausgetobt wurden ist, und ich der Meinung war, das man Lambda-Funktionen auch in FPC nutzen könnte.
Nur hier werden eben keine Klammern, sondern sprachliche Konstrukte wie PROCEDURE oder BEGIN und END verwendet.

Das mit den "noreturn" und "noexcept" waren dann Spinnereien, die mir beim Überblicken der englischen Dokumentation des FPC Handbuches ins Augen gekommen waren, und ich nicht weiter gelesen haben.

Der eigentliche Zweck dieser Gedanken war, das sich Leute finden könnten, die mir bei der Übersetzung der Dokumentation des FPC Handbuches behilflich sein könnten, da ich auch nicht 100 % den automatisch generierten Text der Online-Translatoren traue.
Selbst deepl benötigt manchmal Hintergrund-Wissen, um die Übersetzung(en) nicht eins zu eins (1:1) zu übernehmen.

Der Rest des Artikels ist wahrlich nur Gebrabbel, und ein Versuch gewesen, mit meinen spärliches Englisch zu zeigen, das was ich unter CLOS Lambda Funktionen verstehe.

Hello,

Please forgive my English - it's bad, yes I know - it isn't my main language and I only know English from school, not as an expert.

By CLOS I meant "closure", which I know of in connection to LISP, and also seem to have read about with regards to JavaScript.
In those languages lambda functions can be used to improve code clarity.
However this "clarity" must be used with caution, since a C++ programmer has a different understanding of clarity than an old hand programming in LISP.
Of course the same goes for other languages as well.

I had this whole thing floating around my mind because an older response in this thread was arguing about "parentheses", and I thought that lambda functions could also be used in FPC.
It's just that instead of parentheses, language constructs like PROCEDURE or BEGIN and END are used here.

That thing about "noreturn" and "noexcept" was then nonsense that caught my eye while looking over the English FPC manual documentation, which I didn't read any further.

The intended purpose of these thoughts was maybe to find some people who could help me translate the FPC manual documentation, because I also don't 100 % trust the automatically-generated output of online translators.
Even deepl sometimes requires background knowledge to not just translate what's written one-to-one (1:1).

The rest of my response really is just babble, and also an attempt to explain what I mean by CLOS lambda functions using my sparse knowledge of English.

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #46 on: March 31, 2025, 08:20:55 am »
thank's @Khrys
for your effort.
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6321
  • Compiler Developer
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #47 on: April 01, 2025, 09:28:47 pm »
It does not matter whether your English is good or bad, please only use English in the international part of the forum or at least also  provide a translation (e.g. by Google Translate). If you prefer German then use the German Lazarus Forum instead.

Please don't target  @paule32,  it was me who requested a response in German ("Könntest du das bitte auf Deutsch wiederholen?" means "Could you please repeat that in German?").
The onus to provide a translation is on me, if anything:

Then please stop requesting such on the international forum. If needed you can use direct messages to exchange potential content for translation, but an approach like as done here just messes up the flow.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6321
  • Compiler Developer
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #48 on: April 01, 2025, 09:45:50 pm »
By CLOS I meant "closure", which I know of in connection to LISP, and also seem to have read about with regards to JavaScript.
In those languages lambda functions can be used to improve code clarity.
However this "clarity" must be used with caution, since a C++ programmer has a different understanding of clarity than an old hand programming in LISP.
Of course the same goes for other languages as well.

I had this whole thing floating around my mind because an older response in this thread was arguing about "parentheses", and I thought that lambda functions could also be used in FPC.
It's just that instead of parentheses, language constructs like PROCEDURE or BEGIN and END are used here.

FPC main has anonymous functions (in this thread on the German forum you can find a machine generated German translation of the announcement) which are the Object Pascal variant of lambda functions.

That thing about "noreturn" and "noexcept" was then nonsense that caught my eye while looking over the English FPC manual documentation, which I didn't read any further.

I still wonder where you found the noexcept, because FPC does not support that... 🤔

MarkMLl

  • Hero Member
  • *****
  • Posts: 8533
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #49 on: April 02, 2025, 08:28:53 am »
I still wonder where you found the noexcept, because FPC does not support that... 🤔

Science fiction.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Logitech, TopSpeed & FTL Modula-2 on bare metal (Z80, '286 protected mode).
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #50 on: April 02, 2025, 11:08:25 am »
hehe...
noexcept comes from my C++ knowledge ... has nothing to do with FPC.

It was a windblow thinking thought...
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

BeniBela

  • Hero Member
  • *****
  • Posts: 955
    • homepage
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #51 on: April 03, 2025, 05:20:50 pm »
I still wonder where you found the noexcept, because FPC does not support that... 🤔

Science fiction.

MarkMLl

or an LLM hallucination

paule32

  • Hero Member
  • *****
  • Posts: 645
  • One in all. But, not all in one.
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #52 on: April 04, 2025, 12:14:54 pm »
LLM ?

Loud Laugh Method(s) ?  ;D
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

PascalDragon

  • Hero Member
  • *****
  • Posts: 6321
  • Compiler Developer
Re: NIL vs. Assign: when to use - or: what are the differences ?
« Reply #53 on: April 07, 2025, 09:56:47 pm »
LLM ?

Large Language Model. The current poster child responsible for the current AI hype.

 

TinyPortal © 2005-2018