Closed tanner0101 closed 8 years ago
Does final
still allow adding extensions?
It should only prevent subclassing. Extensions seem like they will always be dynamic calls. Probably no way to optimize that.
I'd be fine with doing this, I just want to make sure there's a good reason. Probably the best evidence would be if you tried profiling with and without final and told me the difference in your usecase. It's always a balance. But we would be giving up some flexibility (the ability to subclass TCPClient), so I want to understand how much we'd gain here.
I didn't know you had the intent to allow subclassing on TCP client.
If that is the case, then the end user can make a final subclass themselves if they need the added performance.
Making the TCPClient class final could potentially give some performance benefits since the compiler could use direct method calls.