On Tue, Jan 19, 2021 at 5:16 PM Kevin Chadwick <m8il1i...@gmail.com> wrote:

> On 1/19/21 3:32 PM, Axel Wagner wrote:
>
> > "I think this design sucks, you should throw it away and start from
> scratch"
> I assume you believe that is what I affectively said


I think it is what OP has effectively said. The design is called "generic
programming using type parameters" and they suggested not having type
parameters.


> There is obviously a lot more than syntax to the proposal.
>

Yes. And there are definitely syntactical choices that can be decoupled -
like how we went from `(type T)` to `[T any]`. Not having type parameters
or ways to constrain them, though, is more than just a syntactical choice.
It removes the actual core of the design. Of the ten bullet points in the
high-level design description
<https://go.googlesource.com/proposal/+/master/design/go2draft-type-parameters.md#very-high-level-overview>,
9 are directly tied to the semantics of type-parameters and their
constraints (the only exception is `any`, which is just a minor syntactical
convenience, which I would even call irrelevant to the design).

Perhaps the requirements and syntax should be separate proposals. Though
> Ians
> remarks make it sound like most if not all of the requirements may have
> been
> finalised a while ago?
>

I don't think so. Some requirements are definitely non-negotiable. Some, I
hope, can still be dropped (though I'm not very optimistic). Some,
definitely, could still be added - after all, one of the express purposes
of publishing the draft and the prototype, is to let people experiment and
bring up things that they want to do, but can't, using the design.

But also, yes. Ten years is a long time to talk about what generics must be
able to provide and what restrictions they must not impose. And at some
point, to make progress, you must commit to something. So if you want to
re-negotiate some of the more basic requirements, you likely need to make a
very good case.

I am certainly not sold on the idea that an "idiomatic" interface like
> approach
> is going to be less rather than more confusing (removing upvote).
>
> --
> 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.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/golang-nuts/c73f30e4-558a-b7e4-5706-d879936e68d0%40gmail.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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAEkBMfGE9V2Mc1X1oTUC44B1TbPVhF-2GfniDjtMHnGjpTYGWA%40mail.gmail.com.

Reply via email to