generics

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 0 Imported by: 0

README

Generics

GoDoc In golang, it's been said that interface{} doesn't say anything. This is why you should avoid programming against it as a replacement for the lack of generics, as it's a meaningless crutch which tells you nothing about the behavior of the types underneath it.

I couldn't agree more.

That's why I've built package generics.

Say it with G

Package generics exposes a single, powerful interface, G. With G, a golang developer (or gopher, as they like to be called) can confidently and securely rely on the power and flexibility of golangs built in interface{}, without the bad feelings and guilt of going against the wisdom of the crowds.

G is for Generics

With G, you can take ugly code signatures like this:

func UglyUnIdiomaticQuoteGenericApproachUnquote(poorexcuse ...interface{}) []interface{}

And transform it into the embodiment of meaningful code for which their can be no ambiguity

func Excellence(things ...G) []G

Backwards Compatibility

G meets the standard of golang by matching it's stance on backwards compatibility. Until a 2.0 release of generics, which may never happen, G will always be 100% Backwards compatible.

Afterword

I hope you enjoy programming with generics as much as I do. The best part about golang is the involvement of the community in shaping the future of the language.

License

Apache v2 - See LICENSE

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type G

type G interface{}

G is an interface under which all possible types apply

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL