Skip to content

language: add maps #202

Description

@katcipis

It would be great to finally have some way to structure data that is not solely positional (lists).

The idea is to build something with a syntax very close to Go/Python:, initializing:

a = {
    "a" : 1,
    "b" : "c",
    "c" : [ 1, 2, 3 ],
    "d" : {
    }
}

Accessing:

a["b"]

Assigning/adding:

a["b"] = 5

We can leverage maps to implement packages adding some syntatic sugar for acess/assigment:

a.value = 5
echo $a.value

Calling a function from a map would be clean, as:

a.dostuff()

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions