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

refactor(commands/id): use new command #5646

Merged
merged 1 commit into from
Oct 25, 2018

Conversation

overbool
Copy link
Contributor

License: MIT
Signed-off-by: Overbool [email protected]

License: MIT
Signed-off-by: Overbool <[email protected]>
@overbool overbool requested a review from Kubuxu as a code owner October 25, 2018 17:13
@Stebalien Stebalien merged commit 00a4b38 into ipfs:master Oct 25, 2018
@overbool
Copy link
Contributor Author

@Stebalien Why do we keep both old and new commands? is there any problem about replacing all old command with new command?

@Stebalien
Copy link
Member

We should switch, we just haven't completed the transition.

The why is largely because every time I start doing that I run into ipfs/go-ipfs-cmds#65 and get side-tracked, However, I've now finally "fixed" it here: ipfs/go-ipfs-cmds#128 so maybe this'll stop being an issue...

@overbool overbool deleted the refactor/commands/id branch October 25, 2018 23:43
@overbool
Copy link
Contributor Author

overbool commented Oct 26, 2018

@Stebalien Is there any essential difference between MakeTypedEncoder and MakeEncoder?

IMO, If we use MakeTypedEncoder, we just don't need to do type conversions(because it take in the real parameter instead of interface). In addition to this, are there any obvious advantages about using MakeTypedEncoder? if not, why don't we just use MakeEncoder or MakeTypedEncoder uniformly?

@Stebalien
Copy link
Member

Is there any essential difference between

It's just easier to use. Basically, you don't have to handle the type checks yourself. Really, we should always be using MakeTypedEncoder as, IMO, it's easier to read.

We have both because MakeTypedEncoder came later.

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 this pull request may close these issues.

2 participants