Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generics should be based on models #15295

Closed
benjamingr opened this issue Apr 14, 2016 · 1 comment
Closed

Generics should be based on models #15295

benjamingr opened this issue Apr 14, 2016 · 1 comment
Labels
FrozenDueToAge generics Issue is related to generics

Comments

@benjamingr
Copy link

Please see: http://dl.acm.org/citation.cfm?id=2738008 by Barbara Liskov:

The support for generic programming in modern object-oriented programming languages is awkward and lacks desirable expressive power. We introduce an expressive genericity mechanism that adds expressive power and strengthens static checking, while remaining lightweight and simple in common use cases. Like type classes and concepts, the mechanism allows existing types to model type constraints retroactively. For expressive power, we expose models as named constructs that can be defined and selected explicitly to witness constraints; in common uses of genericity, however, types implicitly witness constraints without additional programmer effort.

I think what they did there is pretty cool - I'm sorry if this is the incorrect place to stop but I couldn't find a place to comment in /proposals and I didn't find an appropriate issue here.

benjamingr referenced this issue in golang/proposal Apr 14, 2016
Change-Id: I66c07d7bc03f63fa7713ff7408d436a7f8b2b8af
Reviewed-on: https://go-review.googlesource.com/22059
Reviewed-by: Andrew Gerrand <[email protected]>
@bradfitz
Copy link
Contributor

The top of https://github.com/golang/proposal/blob/master/design/15292-generics.md has a line:

"Discussion at https://golang.org/issue/15292"

Feel free to copy your comment to #15292

@golang golang locked and limited conversation to collaborators Apr 15, 2017
@ianlancetaylor ianlancetaylor added the generics Issue is related to generics label Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge generics Issue is related to generics
Projects
None yet
Development

No branches or pull requests

4 participants