Lartu / ldpl

COBOL-like programming language that compiles to C++. With serious dinosaurs with neckties and briefcases 🦕💼
https://www.ldpl-lang.org/
Apache License 2.0
158 stars 24 forks source link

Document multicontainers #140

Closed Lartu closed 4 years ago

Lartu commented 5 years ago

There's a big issue with LDPL right now: we cannot have lists of lists, nor maps of lists nor lists of maps nor any compound type. If we had that, the language would be way more useful and a lot bunch more interesting libraries could be coded for it (and thus, used more in real-world scenarios).

I imagine the syntax would be something like:

compoundFoo is number list map

meaning that compoundFoo is a map<list>, and so we could access its members like

compoundFoo:"someKey":4 #container:key:index

dgarroDC commented 5 years ago

I agree that LDPL needs this, but there's a problem of ambiguity in the accessing syntax with what we already have, A:B:C could be like A[B[C]] (LDPL current syntax) or like (A[B])[C].

Lartu commented 5 years ago

Added in https://github.com/Lartu/ldpl/commit/75f7f70833760e88f46c2e77631f73d749d3d0a4. Documentation still due.