- Proposal: SE-NNNN
- Authors: Karl Wagner
- Review Manager: TBD
- Status: Awaiting review
- Implementation: apple/swift#66247
- Upcoming Feature Flag:
NestedProtocols
- Review: (pitch)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum SortOrder { | |
case ascending | |
case descending | |
} | |
@inlinable @inline(__always) | |
public func isLessThan<Root, each Value: Comparable>( | |
_ leftRoot: Root, | |
_ rightRoot: Root, | |
comparing properties: repeat ((Root) -> each Value, SortOrder) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import sys | |
import gzip | |
import urllib | |
import urlparse | |
import posixpath | |
import cStringIO | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/swift | |
// | |
// - This is just some AppKit boilerplate to launch a window. | |
// | |
import AppKit | |
@available(OSX 10.15, *) | |
class AppDelegate: NSObject, NSApplicationDelegate { | |
let window = NSWindow() | |
let windowDelegate = WindowDelegate() |
In order to make it easier to read/write key-value pairs from URL components, WebURL 0.5.0 will include a new KeyValuePairs
type. The current formParams
view will be deprecated and removed in the next minor release.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Collection { | |
public subscript(inplace_slice bounds: Range<Index>) -> Slice<Self> { | |
get { fatalError() } | |
_modify { | |
var slice = Slice(base: self, bounds: bounds) | |
yield &slice | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright The swift-url Contributors. | |
// | |
// Licensed under the Apache License, Version 2.0 (the "License"); | |
// you may not use this file except in compliance with the License. | |
// You may obtain a copy of the License at | |
// | |
// http://www.apache.org/licenses/LICENSE-2.0 | |
// | |
// Unless required by applicable law or agreed to in writing, software | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView: View { | |
@State var immutableForm = false | |
@State var data = Person( | |
name: "Johnny Appleseed", address: "The spaceship", dateOfBirth: Date(), | |
aSwitch: true, anImmutableString: "Hello, world!", anImmutableSwitch: false | |
) | |
var body: some View { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use the following Package.swift: | |
// ----------------------------------------------------------- | |
// swift-tools-version:5.5 | |
// The swift-tools-version declares the minimum version of Swift required to build this package. | |
// | |
//import PackageDescription | |
// | |
//let package = Package( | |
// name: "uniqueid-test", | |
// dependencies: [ |
NewerOlder