Open david-rhodes opened 7 years ago
Solution: pass these parameters in the constructor?
Generally speaking, I prefer passing (a lot of) parameters as a single objects as it makes refactoring easier when additional parameters are needed later on as it doesn't change the signature of the method.
But yeah, if it helps here, no objection.
Do we even use
Headers
?
Not yet. But I put Headers
there in preparation for tile fetching improvements: multithreading, error evaluation (e.g.: X-Rate-Limit-Reset
, https://www.mapbox.com/api-documentation/#rate-limits) and better feedback on errors.
if we have a struct that contains contains a reference-typed variable then the garbage collector must examine the whole struct.
So this is same as a class right? Why are we using struct for Parameters and Response in the first place? Them being struct means whole thing is cloned every time it's passed to another function, which probably creates a bigger inefficiency to begin with.
From Unity documentation:
Tile.Parameters
:Solution: pass these parameters in the constructor?
Response
:Solution: Handle errors with a different pattern. Do we even use
Headers
?/cc @brnkhy @isiyu @MateoV @BergWerkGIS