I do believe (hope) David was kidding. Anonymous product types (and similar 
constructs) are the root of all evil.

> On Jan 3, 2021, at 11:32 AM, roger peppe <rogpe...@gmail.com> wrote:
> 
> FWIW I'm certain that the lack of tuples in Go was a very deliberate decision 
> - one of Go's more significant ancestors, Limbo, had tuples.
> Anonymous product types have their disadvantages too (you don't get to name 
> the members, so code can end up significantly harder to understand), which I 
> suspect is why Go didn't get them.
> 
> > People will even realize that when you compile this, you don't have to pass 
> > a pointer to said tuple but can make a choice on calling convention which 
> > passes such tuples in registers to speed up the system and be as fast as 
> > any other language.
> 
> I believe that the new register calling convention will do this for structs 
> FWIW.
> 
> 
> On Sun, 3 Jan 2021 at 13:25, Jesper Louis Andersen 
> <jesper.louis.ander...@gmail.com <mailto:jesper.louis.ander...@gmail.com>> 
> wrote:
> 
> On Thu, Dec 31, 2020 at 9:45 PM da...@suarezhouse.net 
> <mailto:da...@suarezhouse.net> <da...@suarezhouse.net 
> <mailto:da...@suarezhouse.net>> wrote:
> Real use cases have been provided it appears for both why generics can be 
> good and how they can be used negligently (love the sextuple example BTW).
> 
> Some future language will invent the idea that you should be able to create 
> anonymous product types on the fly and use those as return values when you 
> want multiple return values. They'll even realize once you have anonymous 
> product types, every function just needs to take a single argument and return 
> a single argument, since you can just use an anonymous product type (i.e., a 
> tuple) if you want to pass multiple things. People will even realize that 
> when you compile this, you don't have to pass a pointer to said tuple but can 
> make a choice on calling convention which passes such tuples in registers to 
> speed up the system and be as fast as any other language.
> 
> Then people will have reinvented Standard ML from 1991.
> 
> 
> -- 
> 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 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/CAGrdgiVJe_2L5QZ13v-SBZq2C7_e6nX8JDCAE23BcpWqGyH99Q%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/golang-nuts/CAGrdgiVJe_2L5QZ13v-SBZq2C7_e6nX8JDCAE23BcpWqGyH99Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> 
> -- 
> 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 
> <mailto:golang-nuts+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/CAJhgaci-M2iL%3DjPL2KB3BbhzRahBz4pjDUPjkiTAF_jjza6FAw%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/golang-nuts/CAJhgaci-M2iL%3DjPL2KB3BbhzRahBz4pjDUPjkiTAF_jjza6FAw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/E02530D4-7E72-4B1B-AE9A-A86E59F38A4C%40ix.netcom.com.

Reply via email to