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

Unify String representation of Maps #4641

Closed
simonvonhackewitz opened this issue Jan 21, 2025 · 2 comments · Fixed by #4646
Closed

Unify String representation of Maps #4641

simonvonhackewitz opened this issue Jan 21, 2025 · 2 comments · Fixed by #4646
Labels
base library related to the Fuzion base library question A decision or information is required

Comments

@simonvonhackewitz
Copy link
Collaborator

I've found different implementations of as_string:

Format Implementation
(1 => one), (2 => two) Mutable_Map, ps_map
{2=two, 1=one} mutable_tree_map
[(1,one), (2,two)] hash_map
@simonvonhackewitz simonvonhackewitz added the question A decision or information is required label Jan 21, 2025
@michaellilltokiwa michaellilltokiwa added the base library related to the Fuzion base library label Jan 21, 2025
@michaellilltokiwa
Copy link
Member

I like this one: {(1 => one), ...}

@simonvonhackewitz Can you find out how other languages do it?

@simonvonhackewitz
Copy link
Collaborator Author

python
{1: 'one', 2: 'two'}

Java
{1=one, 2=two}

Haskell
fromList [(1,"one"),(2,"two")]

@simonvonhackewitz simonvonhackewitz changed the title What should be the String representation of Maps? Unify String representation of Maps Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
base library related to the Fuzion base library question A decision or information is required
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants