requires all Go code to pass a context.Context argument to every function.
This sucks for cross cutting concerns in practice. In rails I used the request_store gem to spice this issue instead for adding more context to the lograge logger lines. You can’t realistically pass this everywhere without a massive effort.
I think they would reply that any cross-cutting concern can add additional goroutines, I/O and remote calls, necessitating a context for cancellation purposes. If you squint, it’s really a variant on the coloring problem. Ideally future languages will support implicit contexts in the same manner as object oriented programming added an implicit object context.
This sucks for cross cutting concerns in practice. In rails I used the request_store gem to spice this issue instead for adding more context to the lograge logger lines. You can’t realistically pass this everywhere without a massive effort.
I think they would reply that any cross-cutting concern can add additional goroutines, I/O and remote calls, necessitating a context for cancellation purposes. If you squint, it’s really a variant on the coloring problem. Ideally future languages will support implicit contexts in the same manner as object oriented programming added an implicit object context.