A new fpc desirable feature

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

A new fpc desirable feature

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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Karoly Balogh (Charlie/SGR)
Hi,

On Tue, 17 Jul 2018, Giuliano Colla wrote:

> 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 )
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Reimar Grabowski
In reply to this post by Giuliano Colla
On Tue, 17 Jul 2018 13:56:39 +0200
Giuliano Colla <[hidden email]> wrote:

> 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.

Not against you but that's the most stupid proposal I ever heard.
I DO NOT beg the compiler for something, I command.

R.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Giuliano Colla
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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Giuliano Colla
In reply to this post by Karoly Balogh (Charlie/SGR)
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.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

wkitty42
On 07/17/2018 11:56 AM, 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.*
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Jim Lee
In reply to this post by Giuliano Colla


On 07/17/18 04:56, Giuliano Colla wrote:

> 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


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

dmitry boyarintsev
Please, fpc-other please
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Tomas Hajny-2
On Tue, July 17, 2018 19:49, Dmitry Boyarintsev wrote:
> Please, fpc-other please

Indeed - please, everybody make sure to keep the discussion on this list
on topic, this thread doesn't belong to this list.

Tomas
(one of FPC mailing list moderators)


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Giuliano Colla
Il 17/07/2018 23:40, Tomas Hajny ha scritto:
Indeed - please, everybody make sure to keep the discussion on this list
on topic, this thread doesn't belong to this list.

You are perfectly right that the discussions on this list should be kept on topic. But I don't agree that this thread is out of place. It only has deviated from the core of the matter, as suggested by my post.

The purpose of my post was not to joke or to troll.

My aim was to point out, by means of a paradoxical proposal, that too many discussions suggest to transform fpc into something completely different, a sort of hybrid thing, mixing up C++ features, Ada features, Java features and God knows what else.

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!

In that case, however, it turned out that even the craziest idea such as the please keyword wasn't new, but already present in the INTERCAL language, and this led to some off-topic remarks. You cannot think of anything crazy without discovering that someone crazier than you has already implemented it!

However it remains that Pascal is a very good language, whose clarity and self consistency require some small sacrifice. Too many programmers do not realize that saving a bit of typing may cost a lot in debugging and maintaining, and that what matters is not the time spent in typing, but the total time from the beginning, up to a fully debugged production ready program, which can be maintained by other people as well.

Sorry for the extra noise generated, but the main point remains. Please help to keep this list on its topic, which is to help users to exploit Pascal at his best, to point bugs or things that can be improved, and not to betray Pascal spirit.

Giuliano

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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A new fpc desirable feature

Ryan Joseph


> On Jul 18, 2018, at 5:08 AM, Giuliano Colla <[hidden email]> 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

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal