Skip to content

allocator passed in to init() #1

Description

@komuw

Hi,

Thanks for this library, it's exactly what I have been looking for.
Since in zig, most functions/structs etc that can allocate usually take in an allocator as the first parameter,
wouldn't it make more sense then for the string struct to take an aloocator in it's init method?
https://github.com/clownpriest/strings/blob/9e55cbc8b33ddd42ebf945ae4f3f1ed097a7d758/src/strings.zig#L17

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions