Re: Fwd: What to do to get new users

Hairy Pixels via fpc-pascal <[email protected]>
Newsgroups gmane.comp.compilers.free-pascal.general
Message-ID <CAGsUGt=V0FHezVw5un-RmjjDBN7wBC_re7fw=zhvY76JQPgbcw@mail.gmail.com>
 On Oct 18, 2024 at 3:41:49 PM, Karoly Balogh via fpc-pascal <
[email protected]> wrote:

> Maybe it was mentioned in the thread, I just glanced through it, but how
> about ARC (Automatic Reference Counting), Objective C style? To be honest,
> I really liked that, and we already have it kind of in place for strings,
> even temporary strings and maybe even temporary arrays created inside a
> function. We'd just need to extend it for a bunch of other things, I
> suppose. Manual FreeAndNil() is the ugliest part of Object Pascal for me
> for sure... OTOH, for Object Pascal you might end up with RAII in this
> case, instead of ARC, because how how the language works. I did not like
> it that much in C++, but maybe because modern C++ syntax is properly
> horrid...
>

The compiler already has all the plumbing for implementing this but they
would need to agree to a new class type which includes has the same ref
counting as AnsiString, Interfaces and other types. I mentioned this
multiple times but Sven objected to it stating he already tried and
uncounted some edge cases.

I think an entirely new class type would be required and that’s where the
resistance came from. Sven can refresh us on this if he wants.

Regards,
    Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.