-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc string for
AblyEventStreamHandler
and raise proper error on uni…
…mplemented event channels
- Loading branch information
Rohit R. Abbadi
committed
May 7, 2020
1 parent
c93bb90
commit d59f89a
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d59f89a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies if you've moved on since but why is the code just commented out rather than deleted?
d59f89a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QuintinWillison this will be uncommented while implementing respective features. Do you prefer to be removed and re-written rather than have comments in code?
My view: we can enforce such restrictions once the library is in good shape.
d59f89a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of everything should be clear. So if there is code that is commented-out, then at a minimum the purpose of leaving it there should be clear - at least, that means leaving a
TODO
and comment explaining it. Perhaps the purpose is that the commented-out code is illustrative of what the code is supposed to do, for example.However, if the purpose is just to avoid having to re-enter it when you want to reinstate the code, then I personally would prefer that it's not there. You can get the code from the previous revision if necessary.
If you are leaving it there just to remind you to do it at a later time, then a
TODO
comment or an issue, or both, are I think a better way to track it.Sometimes you will create a function or method with an empty body because you need it to exist to satisfy an interface, but that implementation is not part of the present PR. That's fine so long as there's a comment that makes it clear (eg with a
TODO: unimplemented
comment or similar).d59f89a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@QuintinWillison @paddybyers this commented out code has been removed in the re-codec PR #13 as a result of other discussion.