Replies: 8 comments
-
One issue that I personally ran into was extending the Client, to be able to overwrite |
Beta Was this translation helpful? Give feedback.
-
I would also very much like to see this. I know that this could bring maintenance burdens BUT I also feel like we are all adults in this industry and that the I feel we should never force the user to not be able to do things (like extending our implementations because they are If a user chooses to extend a internal class and comes knocking that we broke their code it's very easy to point out they consented to doing it and help them fix it and move on. |
Beta Was this translation helpful? Give feedback.
-
I disagree for multiple reasons: first of all, obviously, the added maintenance burden. But more than that, |
Beta Was this translation helpful? Give feedback.
-
I want to avoid two things in v4.0
I'll propose some changes in a PR soon, maybe we can find a good middle ground here. |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I get what this has to do with allowing people to extend classes. As soon as you make a class extendable, you are forcing people to update their code a lot more because they have to keep up with the changes you make, and in turn you can't make changes because you will break their code.
The current codebase is already favouring composition over inheritance. As I said, there are some cases where we may indeed want to allow people to extend the classes, but there are also many other cases where we don't want to. And honestly, I don't think that doing something just because it's quicker is a good way of thinking. |
Beta Was this translation helpful? Give feedback.
-
Nothing. I just wanted to make sure that we do not blindly rush into changing the whole API of the SDK to something composable and then let our users deal with it.
Can we make this assumption? So far, we didn't enable this for our users, so I don't think the minute we remove
I added a very specific problem above. Let's start integrating on this. |
Beta Was this translation helpful? Give feedback.
-
There have been a few specific cases (mostly related to the part that initializes the transport and HTTP client) where people had some struggle in extending/changing the SDK, but apart from that I don't remember of people opening issues here and there to ask for more flexibility in this regard. I think we should guide our users to proper extension points, not let them shoot themselves in the foot and us with them.
I highly doubt that people spend their day changing the behaviour of the SDK by extending classes and things like that. I can understand why you want to allow the |
Beta Was this translation helpful? Give feedback.
-
This. The contrary is a BC instead, so leaving those there is the conservative way to go. |
Beta Was this translation helpful? Give feedback.
-
Problem Statement
The current code base marks most classes as
final
. This makes it almost impossible to people to extend our code if they have a valid reason to do so.Solution Brainstorm
Moving forward (v4.0), we should switch to annotating our classes as
@internal
instead.Beta Was this translation helpful? Give feedback.
All reactions