Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

language: add maps #202

Open
katcipis opened this issue Apr 1, 2017 · 0 comments
Open

language: add maps #202

katcipis opened this issue Apr 1, 2017 · 0 comments

Comments

@katcipis
Copy link
Member

katcipis commented Apr 1, 2017

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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants