News for hackers. Stuff that matters.
Re:Is Go Duck-Typed? by jolux on Wednesday March 04, 2020 @09:34PM (#22490421)
Are records structural in Standard ML? What happens if you have multiple records with the same structure but different names? I thought structural typing of records was not very useful without row polymorphism.
Re:Is Go Duck-Typed? by bjz_ on Wednesday March 04, 2020 @10:23PM (#22490680)
Records of the same structure but different names are equivalent. In fact tuples are just sugar over records with numeric fields starting from 1. Note that this is not the same as in OCaml, afaik.
Re:Is Go Duck-Typed? by jolux on Thursday March 05, 2020 @09:45AM (#22493887)
It depends. OCaml explicitly has polymorphic records as well.