Closed
Description
All comma-ok expressions return an ok value of type bool at the moment: - map index: http://tip.golang.org/ref/spec#Index_expressions - type assertion: http://tip.golang.org/ref/spec#Type_assertions - channel receive: http://tip.golang.org/ref/spec#Receive_operator There is no reason for them to not return an untyped bool instead: - an untyped bool can be assigned to any bool variable - an untyped bool will default to a bool type in a declaration (var _, ok = ... ; or _, ok := ...) - an untyped bool will default to a bool type in an assignment to an interface This would be a completely backward-compatible language change.