gen - Type-driven code generation for Go

  •        22

gen is a code-generation tool for Go. It’s intended to offer generics-like functionality on your types. Out of the box, it offers offers LINQ/underscore-inspired methods.It also offers third-party, runtime extensibility via typewriters.



Related Projects

genny - Elegant generics for Go

  •    Go

(pron. Jenny) by Mat Ryer (@matryer) and Tyler Bunnell (@TylerJBunnell). Until the Go core team include support for generics in Go, genny is a code-generation generics solution. It allows you write normal buildable and testable Go code which, when processed by the genny gen tool, will replace the generics with specific types.

goderive - Next generation code generator for go

  •    Go

goderive derives mundane golang functions that you do not want to maintain and keeps them up to date.It does this by parsing your go code for functions, which are not implemented, and then generates these functions for you by deriving their implementations from the input parameter types.

jennifer - Jennifer is a code generator for Go

  •    Go

Jennifer is a code generator for Go.If you get stuck, have a question, would like a code review, or just want a chat: I'm happy to help! Feel free to open an issue, email me or mention @dave in your PR.

fo - An experimental language which adds functional programming features to Go.

  •    Go

Fo is an experimental language which adds functional programming features to Go. The name is short for "Functional Go". Go already supports many features that functional programmers might want: closures, first-class functions, errors as values, etc. The main feature (and in fact only feature for now) that Fo adds is type polymorphism via generics. Generics encourage functional programming techniques by making it possible to write flexible higher-order functions and type-agnostic data structures.

gomacro - Interactive Go interpreter and debugger with REPL, Eval, generics and Lisp-like macros

  •    Go

gomacro is an almost complete Go interpreter, implemented in pure Go. It offers both an interactive REPL and a scripting mode, and does not require a Go toolchain at runtime (except in one very specific case: import of a 3rd party package at runtime). press TAB to autocomplete a word, and press it again to cycle on possible completions.

go-linq - .NET LINQ capabilities in Go

  •    Go

A powerful language integrated query (LINQ) library for Go. Although Go doesn't implement generics, with some reflection tricks, you can use go-linq without typing interface{}s and type assertions. This will introduce a performance penalty (5x-10x slower) but will yield in a cleaner and more readable code.

pie - 🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance

  •    Go

Enjoy a slice! pie is a code generator for dealing with slices that focuses on type safety, performance and immutability. Run go generate. This will create a file called cars_pie.go. You should commit this with the rest of your code. Run go generate any time you need to add more types.

Objective-C-Generics - Objective C Generics

  •    Objective-C

Objective C Generics is an effort to try to support basic generics in Objective C. Copy ObjectiveCGenerics.h to your project. When defining a new class use the GENERICSABLE macro.

NGenLib: .Net Generics library

  •    CSharp

NGenLib is a C# generics library for .NET 2.0 inspired by the C++ STL and capable of elegantly coexisting with the .NET framework.

Commons-Collections with Generics

  •    Java

A Java 5 generics-enabled version of the popular Jakarta Commons-Collections project. All appropriate classes from Commons-Collections 3.1 have been refactored to support Java generics.



A suite of Ada 2012 generics to facilitate iterative and recursive parallelism for multicore systems and provide safer recursion for single and multicore systems. Generics include Ravenscar compatible versions for real-time systems. Also Includes paraffinalia, which is a set of useful generics for parallel quicksort, fast fourier transform, function integration, prefix sum, and Red-Black trees

typed - Improvements to PHP's type system in userland: generics, typed lists, tuples and structs

  •    PHP

This package is a mere proof of concept about what's possible in PHP's userland to improve type checking. It adds support for type inference, generics, union types, typed lists, tuples and structs. Because all is done in userland, there are limitations on what syntax is possible. The following examples all show the manual type configuration. There are some cases where type inference falls short, and you have to fall back on manually defining them. You might also prefer the manual approach, for clarity's sake.

LazyCache - An easy to use thread safe generics based in memory caching service with a simple developer friendly API for c#

  •    CSharp

Lazy cache is a simple in-memory caching service. It has a developer friendly generics based API, and provides a thread safe cache implementation that guarantees to only execute your cachable delegates once (it's lazy!). Under the hood it leverages Microsoft.Extensions.Caching and Lazy to provide performance and reliability in heavy load scenarios. As you can see the magic happens in the GetOrAdd() method which gives the consumer an atomic and tidy way to add caching to your code. It leverages a factory delegate Func and generics to make it easy to add cached method calls to your app.

engine - Go 3D Game Engine

  •    Go

G3N (pronounced "gen") is an OpenGL 3D Game Engine written in Go. It can be used to write cross-platform Go applications that show rich and dynamic 3D representations - not just games. A basic integrated GUI framework is provided, and 3D spatial audio is supported through OpenAL. Go 1.8+ is required. The engine also requires the system to have an OpenGL driver and a GCC-compatible C compiler.

SpecializedEnum: a base class to allow enum-like behavior with arbitrary objects

  •    DotNet

This class uses readonly variables, reflection, generics, and an internal ordered list to provide behavior similar to that of an enum but with arbitrary objects or value types rather than only integer numeric types. Public static readonly variables can be added in the derived ...

Compare Generics Objects Using Reflection


This project compare between two generics objects using reflection. The comparison executed by the given type 'T' (which is the same type for both objects) and two objects. The functionality is execute recursive! which mean that it's included comparison in the sub-objects!!!

Time - Type-safe time calculations in Kotlin, powered by generics.

  •    Kotlin

to represent a duration of 10 seconds(in milliseconds) because most methods in Kotlin/Java take duration parameters in milliseconds.

Time - 🕰 Type-safe time calculations in Swift, powered by generics

  •    Swift

To represent 10 minutes. Although, in my opinion, you would rarely need to.

Extended Java WordNet Library

  •    Java

extJWNL (Extended Java WordNet Library) is a Java API for creating, reading and updating dictionaries in WordNet format. extJWNL is an upgraded version of JWNL. The library features support for creating, editing and writing dictionaries; dictionary encodings, including UTF-8; Java generics; huge dictionaries; instance dictionaries and static singletone dictionary; Maven and more.