Skip to content

Instantly share code, notes, and snippets.

View sorenvonsarvort's full-sized avatar

Sᴏʀᴇɴ ᴠᴏɴ Sᴀʀᴠᴏʀᴛ sorenvonsarvort

View GitHub Profile
@sorenvonsarvort
sorenvonsarvort / golang-1.13-will-support-generics.md
Last active March 28, 2021 15:43
golang-1.13-will-support-generics

Golang 1.13 Will Support Generics

Every developer knows generics support is the most wanted feature in any major programming language. A few months ago Rob Pike had already approved several Golang proposals, one of them included the new generics feature. This decision is made not only for engaging more developers to the community, but also for boosting existing projects and scaling their codebases.

https://go.googlesource.com/proposal/+/master/design/go2draft-contracts.md

According to it the generics in Golang are based on the contracts and have a pretty familiar syntax. Here are some examples:

@luser-dr00g
luser-dr00g / xcr.c
Created August 30, 2014 09:35
xcb+cairo hello world window
//xcr.c
//cc -o xcr $(pkg-config --cflags --libs cairo xcb xcb-icccm) xcr.c -lcairo -lxcb -lxcb-icccm
#include <stdlib.h>
#include <string.h>
#include <cairo.h>
#include <cairo-xcb.h>
#include <xcb/xcb.h>
#include <xcb/xcb_image.h>
#include <xcb/xcb_aux.h>
#include <xcb/xcb_icccm.h>