Skip to content

Instantly share code, notes, and snippets.

View el-hoshino's full-sized avatar
🏠
Working from home

Elvis Shi el-hoshino

🏠
Working from home
View GitHub Profile

http://www.wtfpl.net/faq/ の翻訳(非公式)です。 以下の文章には何も保証がありません。

どのように WTFPLを使いますか?

ステップ1. WTFPLの全文をコピー&ペーストもしくはダウンロードし、あなたの成果物と共に配布します。一般的にライセンスファイルの名前は COPYING です。成果物が複数のライセンスを採用している場合は、COPYING.WTFPL というファイル名が一般的です。

ステップ2. あなたの著作権文章に次の文言を追加してください。

@lattner
lattner / async_swift_proposal.md
Last active December 28, 2024 11:11 — forked from oleganza/async_swift_proposal.md
Concrete proposal for async semantics in Swift

Async/Await for Swift

Introduction

Modern Cocoa development involves a lot of asynchronous programming using closures and completion handlers, but these APIs are hard to use. This gets particularly problematic when many asynchronous operations are used, error handling is required, or control flow between asynchronous calls gets complicated. This proposal describes a language extension to make this a lot more natural and less error prone.

This paper introduces a first class Coroutine model to Swift. Functions can opt into to being async, allowing the programmer to compose complex logic involving asynchronous operations, leaving the compiler in charge of producing the necessary closures and state machines to implement that logic.

@takasek
takasek / CodePiece.swift
Last active March 27, 2018 15:44
ポプテピピックが完成したら竹書房を破壊するSwiftコード #CodePiece
import Foundation
enum PopTeamEpic: Int {
case ポ,プ,テピ,ピック
}
struct 蒼井翔太: Sequence, IteratorProtocol {
mutating func next() -> PopTeamEpic? {
return PopTeamEpic(rawValue: Int(arc4random_uniform(4)))
}
}
@GeorgeLyon
GeorgeLyon / Rust vs. Swift.md
Last active March 21, 2025 11:33
A list of advantages Swift has over Rust

Note This is a little out of date. Rust has made some progress on some points, however many points still apply.

Philosophy

Progressive disclosure

Swift shares Rust's enthusiasm for zero-cost abstractions, but also emphasizes progressive disclosure. Progressive disclosure requires that language features should be added in a way that doesn't complicate the rest of the language. This means that Swift aims to be simple for simple tasks, and only as complex as needed for complex tasks.

The compiler works for you