On Wed, Sep 7, 2016 at 8:42 AM, 'Mihai B' via golang-nuts <golang-nuts@googlegroups.com> wrote: > > Any HTTP API with PATCH support needs to use pointers on basic types. > Therefore I'm wondering if there is any will/proposal to make pointer > initialisation easier to work with basic types. The `standard` way is quite > verbose so it seems that most APIs use functions for every possible type[1]. > I think these kind of functions should be provided in the standard library > or preferably the syntax should be extended to support pointer literals < > i.e. something like x := &("hello") ; x := &T("hello") x := &(30) >; . > Some real world examples of APIs that reinvent the pointer initialisation > google[2], amazon aws[3], github[4].
I'm not aware of any current proposal for this. Any change like this should go through the proposal process. Note that the barrier for language changes at this point is extremely high. I'm skeptical that we could support &T(e) as T can itself contain parentheses, so the result would be difficult to parse correctly. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.