Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

[FR] fprintf1() #91

@gustaphe

Description

@gustaphe

I like sprintf1() as a dynamy/performance compromise for @printf, but it's not a drop-in replacement.

When working in a print-ecosystem, you end up doing things like print(io,sprintf(frmt,x)), which unnecessarily generates a string.
I don't know the best way to implement a fprintf1 function without reusing a lot of code, but from what I've seen the most common way to do this kind of thing is to have fprintf be the base function, have sprintf use fprintf on an IOBuffer to generate the string.

Is there a strong reason to not do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions