From c361b51c4b85ce110b0bbea60df38c417e0424e2 Mon Sep 17 00:00:00 2001 From: peter-mckenzie Date: Tue, 4 Sep 2018 07:40:07 +1200 Subject: [PATCH] Destroyed Yet another alternative syntax (markdown) --- Yet-another-alternative-syntax.md | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 Yet-another-alternative-syntax.md diff --git a/Yet-another-alternative-syntax.md b/Yet-another-alternative-syntax.md deleted file mode 100644 index c06110d1..00000000 --- a/Yet-another-alternative-syntax.md +++ /dev/null @@ -1,17 +0,0 @@ -Here's an alternative syntax that uses the familiar <> and avoids parsing complexity by placing it to the left of the identifier. It is a bit (very?) unusual, but has the benefits of brevity and making the type parameters stand out. Converting some examples from [Generics — Problem Overview](https://go.googlesource.com/proposal/+/master/design/go2draft-generics-overview.md#draft-design): - -``` -type List []T -func Keys(m map[K]V) []K -var ints List -keys := Keys(map[int]string){1: "one", 2: "two"}) -``` - - -A method: -``` -type Set []T -func (s Set) Find(x T) int { - ... -} -```