i think the lack of implicit casts makes the idea much better in Go.

I was just thinking of my admiration for goimport sand how nicely that
enriches he programming practice.

if the argument-distinguished function names have the same base name
("MakeCircle$" where $ is one of PointRadius, ThreePoints, ...), and if the
parameter lists are unique, then the same logic the compiler would use to
choose which of the several base-name-only overloaded functions to call can
be lifted from the compiler to an edit-time expander that does name
expansion at the calling site. The programmer can enter MakeCircle(...) but
on save, that will become MakeCircleThreePoints(...). Easy for developer,
clear for all future readers. No change to the language. Think of it as
"continuous govet rewrites"

On Sun, Sep 9, 2018 at 9:54 PM Lucio <lucio.d...@gmail.com> wrote:

>
>
> On Sunday, 9 September 2018 15:54:34 UTC+2, Michael Jones wrote:
>>
>>
>> On the down side, if things go wrong, you don't know what source code to
>> go look at. I admit being confused before (C++) as to which overloaded
>> function/method was being called because of default type casts. That is
>> frustrating and can easily be a source of error.
>>
>> Wouldn't the same rules by which embedded structs can have identically
> named elements at different levels, but cannot use them without
> disambiguation, be in some way applicable here?
>
> I'm sure the compiler can flag method signatures that cannot be be
> distinguished. And there are no "default type casts" in Go, are there? I
> thought that was "the law" (constants are slightly different, there, but
> they can be recognised an flagged).
>
> Lucio.
>
> --
> 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.
>


-- 

*Michael T. jonesmichael.jo...@gmail.com <michael.jo...@gmail.com>*

-- 
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.

Reply via email to