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

Separate dispstrs, reprstrs, and mat2str #8

Open
apjanke opened this issue Jan 24, 2021 · 0 comments
Open

Separate dispstrs, reprstrs, and mat2str #8

apjanke opened this issue Jan 24, 2021 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@apjanke
Copy link
Member

apjanke commented Jan 24, 2021

I think I got the API design wrong for dispstr. Currently, it defines a single dispstr()/dispstrs() conversion technique. But there are different contexts where a different type of representation is appropriate.

I think it should actually have 3 different representation levels/styles:

  • dispstr/dispstrs – Human-readable presentation of the meaning or appearance of the data, targeted toward end users and UIs.
  • reprstr/reprstrs – Human-readable presentation of the internal representation, value, or storage format, targeted toward developers and debugging tools.
  • mat2str – Matlab-readable conversion of the array to an M-code expression that, when evaled, reproduces the input value.

The dispstr vs reprstr distinction is very much like the distinction Python makes between str and repr.

This realization was informed by my work on Fancyclip.

@apjanke apjanke self-assigned this Jan 24, 2021
@apjanke apjanke added the bug Something isn't working label Jan 24, 2021
@apjanke apjanke added this to the 1.2.0 milestone Jan 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant