Skip to content

Instantly share code, notes, and snippets.

Generalized Existentials

Background

Proposal 0095

The proposal pushed forward a new syntax for expressing constraints in the generics system

@lmihalkovic
lmihalkovic / existentials.md
Last active June 12, 2016 17:48
Extended existential
@lmihalkovic
lmihalkovic / literal.swift
Last active May 8, 2016 08:39
Swift multiline string literal prototype
#!/usr/bin/env xcrun swift
// This code sample and prototype implementation (implemented in patch against the 3.0
// branch of the swift compiler) explores a possible syntax based on ideas discussed in
// the swift-evolution mailing list at
// http://thread.gmane.org/gmane.comp.lang.swift.evolution/904/focus=15133
//
// The proposed syntax uses a combination of two characters to signal the start and end
// of a multiline string in the source code: _" contents "_
//
@lmihalkovic
lmihalkovic / 0000-multiline_string_literals.md.md
Last active May 5, 2016 18:29
Markdown formatting for Michael's string literal proposal

MULTI-LINE STRING LITERALS

Introduction

Multi-line string literals allow text that may be multiple lines long, to be included verbatim into a string literal. The string may even contain quote characters (" or '), and they don't have to be specially escaped.

@lmihalkovic
lmihalkovic / KeyValueDelegatingStore.java
Created January 15, 2016 12:29
A small KeyValues store to replace the internal details of PreferencesMap and PreferencesData
package processing.app;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
/**
* A {@code KeyValueStore} implementation that delegates to a default store when a
* value is not found locally. Values added to the store are added locally leaving