El 16/07/2018 a las 15:02, Sven Barth via fpc-pascal escribió:
Santiago A. <s...@ciberpiula.net <mailto:s...@ciberpiula.net>> schrieb am Mo., 16. Juli 2018, 13:41:

    I have some suggestions of change to freepascal syntax, just to debate

    (All are backward compatible)

    - Declaring variables inside blocks, and loop variables

-> reduces readability -> no interest
I think the opposite.
The nearer the declaration to the code where you use it, the better.


    - Autofree pointers

Might come, though not in that way (take your example: what if you pass the instance to some other code that stores it beyond the life time of the function)
In such cases, you don't declare it "auto". Just as you don't free a pointer in the function you declare it if you pass the instance to another code that stores it beyond the life time of the function


    - Try except finally blocks

This had been proposed some time ago and was declined after quite some discussion (either here or on fpc-devel).

    - Private declarations in implementation

Again this reduces readability and thus no interest.

Once again, I think the opposite.
It's not very readable a class where you have to skim through 100 lines of private declaration that you don't care, because you can do nothing with them.


Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


--
Saludos

Santiago A.

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to