The more I look at the proposed generic syntax the more I feel like a texan fearing the californian relocation to my state. In other words I am feeling like Go had something awesome and extremely conservative going on in terms of syntax and because people from other super convoluted languages are coming over (which their leaving should say a lot about their said language) and they don't have their one "to die for" feature from their old language they are expecting us to conform.
The reality I want to ask is whether any of the designers of the language actually want this feature to the point that they want to be looking at said feature all day, every day when they are working on other people's code, or are they just conforming because so many people are asking for a feature, and they feel a desire to give the people what they ask for, without considering the fact that the majority doesn't always consider the implications of what they ask for?
What I mean is to just give us an omnipotent "any" builtin type and to make those special case functions that get extra attention by the runtime.
func sort(a, b any){
if a < b{
lots of pre defined magic happens
}
The current proposals suck
The fact that you keep blogging essentially "hey guys were about to put in generics... are you absolutely sure..... because we aren't and once we do were kind of stuck with it...?"
The answer is simply biological.
If you don't want to then don't. But if you do then put it in already.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6a35c345-1686-4368-a5a8-dcacaa66d717n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfF5D9G0M8OL1TQm9orR6%3D_Ear9mMw-3BesTG%3DVYRjt44g%40mail.gmail.com.
if you're trying to compare "a<b", the compiler (and/or go vet) will store this as a operation necessary for that type to work, as an *implicit contract*. And whenever this function is used, it checks this implicit contract(s) with every type and fails to compile if it doesn't conform.
Similar how you can't compare two slices and it fails to compile, because slices aren't comparable. Internally the compiler would need the information on every possible operation on every type, but i guess this partly exists already, as part of the static checking.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/91fee76b-922c-fd1c-f177-65c9251c6992%40gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfGv8q3c8tXZha%2BVg1mO46WZqi_RTub%2BBGWT6OgrmPk7RA%40mail.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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f6e17dd3-91d5-39eb-7aa2-42f8058f13af%40gmail.com.
Sure, but the Go team needs to be realistic and realise that not everyone is on
the salary that they are or can afford the time that they can, or even on a
consistent salary at all (e.g. founder with two jobs).
Casual observations are not worthless and you don't need to have the answers to know something may seem sub optimal!
After ten years of waiting for the "right" generics. This isn't the time to
disregard the option of fundamental changes.
p.s. I had already upvoted the proposal actually, as it is certainly well
considered and well constrained.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1c1ab297-7165-3cc7-e964-20dc74b3eec6%40gmail.com.
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
There is obviously a lot more than syntax to the proposal.
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 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...@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.
I believe my suggestion included constraints in the function parameter list
whilst avoiding the needless abstraction?
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/56a0130c-64d5-c4a8-ddda-9d22abd99565%40gmail.com.
Seems to me that most generics implementations use a capital letter abstracted type syntax that I hate.
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/17BEE437-A5BB-4152-8215-B3F27A7265C1%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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/F183269A-E743-4069-90C3-0357F5C6D36D%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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/BDDBF610-2D1C-4F8A-880B-AAB2ED321004%40gmail.com.