Skip to content

[Request | Suggestion] Protocol extension hides compiler errors #25

Open
@esttorhe

Description

@esttorhe

I was trying to implement the router on an app and it kept crashing with the error that I wasn't implementing the Routable methods which I had or I thought I had.

The signature was wrong on my implementation and thanks to this extension https://github.com/ReSwift/ReSwift-Router/blob/master/ReSwiftRouter/Routable.swift#L31-L55

The compiler couldn't tell me that was the case because the extension was already providing conformance to the protocol.

Wouldn't it make more sense to remove said extension and let the compiler complain about the lack of conformance to that protocol so newcomers can adopt it more easily?

Maybe there's a bigger issue behind the reasoning of adding this default conformance and I just don't know about it but from my experience having the compiler complain about the wrong signature would have made this easier to track 😄

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions