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

printString reimplementations look suspicious #4855

Closed
Ducasse opened this issue Oct 7, 2019 · 1 comment · Fixed by #4865
Closed

printString reimplementations look suspicious #4855

Ducasse opened this issue Oct 7, 2019 · 1 comment · Fixed by #4865

Comments

@Ducasse
Copy link
Member

Ducasse commented Oct 7, 2019

We should revisit the printString implementations because it looks like some of them are simply printOn: disguised.

In addition some of them promote bad pattern:

MalGraphEdge >> printString

^ self from printString, ' -> ', self to printString

Why do we create two substreams instead of sharing the printString via printOn:?
Here printString each time create a stream then .... it is worse , create spurious copies...
Super super ugly.

In general printOn: in general should not call printString, better use self print: str
So may be we can open another issue for this issue.

@Ducasse Ducasse changed the title printString reimplementation look suspicious printString reimplementations look suspicious Oct 7, 2019
@Ducasse
Copy link
Member Author

Ducasse commented Oct 9, 2019

Thanks this is cool :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant