Dictionary Support #1053
Replies: 5 comments 30 replies
-
Dictionaries will also require a clear type annotation. Should we wish to support statements such as:
then the initial declaration may also need an annotation |
Beta Was this translation helpful? Give feedback.
-
Should we ever add C++ to Pyccel, a dictionary would be easily translated to a map |
Beta Was this translation helpful? Give feedback.
-
Hey same comment as in the list thread, see also https://github.com/P-p-H-d/c-stl-comparison#synthesis for additional C implementations. It would be great if you also supported sets. |
Beta Was this translation helpful? Give feedback.
-
See https://fortran-lang.org/packages/data-types/ for existing Fortran implementations. I like the look of https://github.com/SCM-NV/ftl as it seems to implement many objects (dict, list, etc) but would only add one dependency |
Beta Was this translation helpful? Give feedback.
-
You are correct. FTL is released under LGPL license, not GPL as I wrote above. Therefore we can provide the user with a C Python extension which is dynamically linked to an FTL shared library. |
Beta Was this translation helpful? Give feedback.
-
Dictionaries are very useful in python. Historically dictionaries were not supported due to sympy restrictions. As Pyccel is no longer constructed from sympy this is no longer a problem. Thus the only thing preventing implementation is the choice of how to implement it.
Personally I think the best solution would be to use an existing library however I have no experience with such libraries in Fortran or C.
From Google here are some options:
Fortran (see Fortran wiki)
C (see stack overflow)
Beta Was this translation helpful? Give feedback.
All reactions