On Wednesday, 26 June 2024 at 20:19, Morgan <morganbre...@gmail.com> wrote:
> I do not believe it is appropriate to deprecate strtok() without a proper > replacement. > > While I agree that its signature is undesirable, the suggested replacement > functions or “just write a parser” are not very pleasant solutions to fill > the void it would leave. > > The stateful functionality it exhibits is incredibly useful, though I will > admit confusing. Would it not be better to change how the functionality is > accessed to reflect the fact that state is preserved rather than remove it > entirely and force a performance burden on developers? First of all, please do not top post on the mailing list. Secondly, please explain how you would provide the statefullness. Thirdly please provide an example of usage of strtok() where the suggestions I have given as replies in this thread are not applicable. If the problem is indeed parsing some very complicated structure and you are using strtok for this, I would argue writing a proper parser is overall better. Of note, I'm not the direct author of this section, I just cleaned it up because the initial wording was... draft state like. Best regards, Gina P. Banyard