Re: [go-nuts] function's argument default value

2018-08-22 Thread Wojciech S. Czarnecki
On Wed, 22 Aug 2018 08:09:14 -0700 (PDT) Marvin Stenger wrote: > : A pony. Seven-legged, with three tails, lacking head. (Excuse me, list, just could not resist.) @Marvin: Go uses the default of zero. What you proposed would

Re: [go-nuts] function's argument default value

2018-08-22 Thread Masoud Ghorbani
:)) ok let me show you in the following example: def sayHey(name="You"): print('Hey, {0}'.format(name)) sayHey() # Hey, You sayHey('John') # Hey, John but we don't have parameters default value like Python in Golang. if I want to do this action simply without using structs I should write th

Re: [go-nuts] function's argument default value

2018-08-22 Thread Jan Mercl
On Wed, Aug 22, 2018 at 3:20 PM Masoud Ghorbani wrote: > In my description, I used the argument title instead parameter, sorry for this confusion. Now I'm lost in translation ;-) Can you please show some code illustrating the topic? Like code written now vs code written while feature X would be

Re: [go-nuts] function's argument default value

2018-08-22 Thread Masoud Ghorbani
In my description, I used the argument title instead parameter, sorry for this confusion. On Wednesday, August 22, 2018 at 5:18:34 PM UTC+4:30, Jan Mercl wrote: > > On Wed, Aug 22, 2018 at 2:39 PM Masoud Ghorbani > wrote: > > > Why there isn't function argument default value in Golang explicitl

Re: [go-nuts] function's argument default value

2018-08-22 Thread Jan Mercl
On Wed, Aug 22, 2018 at 2:39 PM Masoud Ghorbani wrote: > Why there isn't function argument default value in Golang explicitly like Typescript and Python? What are the possible benefits? The only things that come to my mind are IMO negative. The definition of the default value is in a different p

[go-nuts] function's argument default value

2018-08-22 Thread Masoud Ghorbani
Why there isn't function argument default value in Golang explicitly like Typescript and Python? -- 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+unsu