Skip to content

Use array syntax for manipulating stdlib lists and use strings as character arrays #27

@daniellandau

Description

@daniellandau

I'd been mulling around writing a native syntax for manipulating lists more easily but never gotten around to doing it. Writing file names three characters at a time with list_push__ is tiring, but I solved that with an external shell script to generate the calls well enough to not bothering implementing anything better in the language.

Now I see #10 from @MickeyDelp adding a native array syntax so I'm more interested than before in getting this done! For my situation malloc/free works better than having arrays in the static arena.

So something like this:

array fname = list_new(5)
fname = 't', 'e', 's', 't', '\0'

But while at it, even better:

array fname = list_new(5)
fname = "test"

Strings to make character arrays would be good for the now existing array functionality too.

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