Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2018-07

A new fpc desirable feature

11 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Giuliano Colla

As everybody is suggesting new fpc features, I feel it right to add my own proposal, to make the language more useful and user friendly.

I propose the support for the keyword "please".

The syntax is quite simple: "please:", followed by the explanation in plain English (or whatever locale is selected) of what you want the compiler to do, makes the compiler generate the appropriate code.

E.g. :

please: fetch from the database xxx the relevant data and put them neatly in a string grid;
please: if the user modifies the data in the string grid, update the database accordingly;

I hope that this simple request will not be rejected, even if it is in line with most of the requests I read in this list and which face strong resistance from core developers :-).

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email

Karoly Balogh (Charlie/SGR
to Giuliano Colla

Hi,

Giuliano Colla wrote 8 lines
As everybody is suggesting new fpc features, I feel it right to add my own proposal, to make the language more useful and user friendly. I propose the support for the keyword "please". The syntax is quite simple: "please:", followed by the explanation in plain English (or whatever locale is selected) of what you want the compiler to do, makes the compiler generate the appropriate code.

Great idea! I also propose that if you do not write "please" often enough, the compiler would error out, claiming the user being too rude. But if it's used too often, the source can be rejected for being excessively polite.

Also maybe it could TRY to a hint an info and warning about this EXCEPT if the code is bogus anyway, before FINALLY erroring out. :-)

Charlie

(Ps: https://en.wikipedia.org/wiki/INTERCAL )

Reply by email

Giuliano Colla
to Reimar Grabowski

Il 17/07/2018 16:06, Reimar Grabowski ha scritto:

I DO NOT beg the compiler for something, I command.

Then I would not be astonished if it turned out that you experience more troubles than the average, such as unexpected sigsev, libraries not found, unexpected shutdowns, and disk errors.

I have learned from Russians that the computer must be treated gently. In Russian the word for computer is feminine, and they say that it must be treated as such. Gently and with love. Be kind with your computer and he (she) will be kind to you! :-)

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email

Giuliano Colla
to Karoly Balogh (Charlie/SGR: Great idea! I also propose that if you do not write "please" often enough, the compiler…

Il 17/07/2018 14:12, Karoly Balogh (Charlie/SGR) ha scritto:

I also propose that if you do not write "please" often enough, the compiler would error out, claiming the user being too rude. But if it's used too often, the source can be rejected for being excessively polite.

A problem would be to determine the appropriate amount of politeness accepted.

Maybe a compiler option, such as -P0 (almost rude) to -P3 (extremely polite)? Or up to -P7 for an increased granularity?

Giuliano

Do not do to others as you would have them do to you.They might have different tastes.

Reply by email

Unknown author
to Giuliano Colla
Giuliano Colla wrote
A problem would be to determine the appropriate amount of politeness accepted. > Maybe a compiler option, such as -P0 (almost rude) to -P3 (extremely polite)? Or up to -P7 for an increased granularity?

go the other way... a P9 is a weapon... to carry the analogy along, if you are using a weapon to achieve a desired goal, you're not necessarily being polite... -P9 would be maximum ""rudeness"" (aka not polite at all)... -P0 would be maximum politeness (aka not rude at all)...

-=B-)

NOTE: No off-list assistance is given without prior approval. *Please keep mailing list traffic on the list unless* *a signed and pre-paid contract is in effect with us.*

Reply by email

Jim Lee
to Giuliano Colla: As everybody is suggesting new fpc features, I feel it right to add my own proposal, to…
Giuliano Colla wrote 23 lines
As everybody is suggesting new fpc features, I feel it right to add my own proposal, to make the language more useful and user friendly. I propose the support for the keyword "please". The syntax is quite simple: "please:", followed by the explanation in plain English (or whatever locale is selected) of what you want the compiler to do, makes the compiler generate the appropriate code. E.g. : please: fetch from the database xxx the relevant data and put them neatly in a string grid; please: if the user modifies the data in the string grid, update the database accordingly; I hope that this simple request will not be rejected, even if it is in line with most of the requests I read in this list and which face strong resistance from core developers :-). Giuliano

And don't forget:

The final line of the program must end with "Thank you."

-Jim

Reply by email

Ryan Joseph
to Giuliano Colla
On Jul 18, 2018, at 5:08 AM, Giuliano Colla wrote: I have not yet seen the proposal to get rid of begin/end and replace it with indentation level, but it appears to be just a matter of time!

I’ve never heard of a single proposal to change the fundamentals of Pascal, only to extend it. That’s a good thing.

I can’t think of any crazy features in FPC off the top of my head. I’ve never used try..except in my own code. Is that crazy?

Python forcing indent is crazy. Swift forcing initialization is crazy. C# forcing visibility keywords for each variable is crazy. All those things are *optional* in Pascal and that’s why I love Pascal.

Regards,
Ryan Joseph

Reply by email