<div dir="auto"><div><div class="gmail_quote"><div dir="ltr">Santiago A. <<a href="mailto:svaa@ciberpiula.net">svaa@ciberpiula.net</a>> schrieb am Mo., 16. Juli 2018, 16:27:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_-4888535101475127684moz-cite-prefix">El 16/07/2018 a las 15:02, Sven Barth
      via fpc-pascal escribió:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="auto">
        <div>
          <div class="gmail_quote">
            <div dir="ltr">Santiago A. <<a href="mailto:svaa@ciberpiula.net" target="_blank" rel="noreferrer">svaa@ciberpiula.net</a>>
              schrieb am Mo., 16. Juli 2018, 13:41:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF">
                <p>I have some suggestions of change to freepascal
                  syntax, just to debate<br>
                </p>
                <p>(All are backward compatible)</p>
                <p>- Declaring variables inside blocks, and loop
                  variables<br>
                </p>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto">-> reduces readability -> no interest <br>
        </div>
      </div>
    </blockquote>
    I think the opposite.<br>
    The nearer the declaration to the code where you use it, the better.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">I disagree. The way it is in Pascal you can easily see which variables are used and what type they have while with inline declarations you need to skim the whole routine. And trust me, only because a variable *can* be declared close to its use it does not mean that it *is*. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div dir="auto"><br>
        </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF">
                <p> - Autofree pointers<br>
                </p>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto">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) <br>
        </div>
      </div>
    </blockquote>
    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<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">But you don't necessarily know that the function you call does that (think third party code). And people *will* use this and don't think about the consequences. So a system with automatic reference counting is safer and that is what is planned, if at all. </div><div dir="auto"><br></div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    <br>
    <blockquote type="cite">
      <div dir="auto">
        <div dir="auto"><br>
        </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF">
                <p> - Try except finally blocks<br>
                </p>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto">This had been proposed some time ago and was
          declined after quite some discussion (either here or on
          fpc-devel). </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div text="#000000" bgcolor="#FFFFFF">
                <p> - Private declarations in implementation<br>
                </p>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto">Again this reduces readability and thus no
          interest. <br>
        </div>
      </div>
    </blockquote>
    <br>
    Once again, I think the opposite.<br>
    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.<br></div></blockquote></div></div><div dir="auto"><br></div><div dir="auto">Again all the declarations reside in one place currently, namely the declaration of the class. With your idea I'd have to search the whole unit not to mention that the order of declaration would be important as well just like it had been in procedural Pascal due to the single pass nature of the language.</div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"></div></blockquote></div></div></div>