Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Define toString directly on Algorithm subclasses? #7

Open
lgarron opened this issue Jul 12, 2018 · 0 comments
Open

Define toString directly on Algorithm subclasses? #7

lgarron opened this issue Jul 12, 2018 · 0 comments

Comments

@lgarron
Copy link
Member

lgarron commented Jul 12, 2018

Pros:

  • Nice, concise formatting by default! (node actually truncates nested values)
  • Can still convert to JSON, so inspectability is not lost.

Cons:

  • Javascript does magic type conversion, and this could cause unexpected issues. For all I know 1 + [alg representing 2R] could turn into 3.
  • Viewing the printed alg instead of the structure might hide unexpected discrepancies.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant