mjtsai + olebegemann   428

Twitter
This is funny (and true): How is computer programming different today than 20 years ago? https://t.co/8UoZmDYlS0

“Code must run behind at least three levels of virtualization now. Code that runs on bare metal is unnecessarily performant.”

— Ole Begemann (@olebegemann) February 26, 2020
FavoriteTweet  olebegemann 
4 weeks ago by mjtsai
Twitter
Some info/conjecture in these threads:https://t.co/MxjMEPpRZuhttps://t.co/UkaHYfQw5i

Short answer: IIUC the default implementation for objectWillChange uses runtime introspection to find all Published properties and injects the publisher.

— Ole Begemann (@olebegemann) January 30, 2020
FavoriteTweet  olebegemann 
8 weeks ago by mjtsai
Twitter
Sheets in SwiftUI don’t inherit the environment from their parent view. I found this surprising. https://t.co/0hzRYSJYEY

— Ole Begemann (@olebegemann) January 23, 2020
FavoriteTweet  olebegemann 
9 weeks ago by mjtsai
Twitter
I just wasted half an hour wondering why this wouldn’t compile in SwiftUI:

Text(Date(), formatter: dateFormatter)

Answer: you have to put everything in a string because this feature uses a custom string interpolation:

Text("\(Date(), formatter: dateFormatter)")

— Ole Begemann (@olebegemann) January 23, 2020
FavoriteTweet  olebegemann 
9 weeks ago by mjtsai
Twitter
The base model Mac Pro draws 101 W when idle. That’s a huge step back from the trash can Mac Pro (45 W) and not much better than the old 2006–2010 cheesegrater models (115–175 W). A maxed out 28-core Mac Pro draws 302 W when idle! https://t.co/ZidQt3Hzxq pic.twitter.com/rG7VP9E4jz

— Ole Begemann (@olebegemann) January 12, 2020
FavoriteTweet  olebegemann 
10 weeks ago by mjtsai
Twitter
Scott James Remnant’s articles on SwiftUI layout are the best and most practical explanation I’ve seen. https://t.co/iI0eHrJdJW Read them all, starting with “Views Choose Their Own Sizes”: https://t.co/ZTwlrALEjy. The full series is 12+ posts, totally worth it.

— Ole Begemann (@olebegemann) January 2, 2020
FavoriteTweet  olebegemann 
12 weeks ago by mjtsai
Twitter
SwiftUI’s layout algorithm may be simple on the surface, but the way the built-in views and view modifiers interact is tremendously complex (and largely undocumented).

— Ole Begemann (@olebegemann) January 2, 2020
FavoriteTweet  olebegemann 
12 weeks ago by mjtsai
Twitter
Caveat: the property wrapper solution doesn’t work for encoding a single dictionary (that isn’t a member of a struct or class) because property wrappers can’t yet be applied to local or global variables.

— Ole Begemann (@olebegemann) December 10, 2019
FavoriteTweet  olebegemann 
december 2019 by mjtsai
Twitter
I now get what @jshier said in this forum thread on one of Combine’s subtle behaviors: “Gotchas like these are one of the reasons why I really don't like using reactive frameworks, even if I design my apps reactively.” https://t.co/1MyyRxDyXH

— Ole Begemann (@olebegemann) November 5, 2019
FavoriteTweet  olebegemann 
november 2019 by mjtsai
Twitter
(2/2)

2. Add another overload for × that takes
• a 2D point and
• a scalar
and returns a 3D point.

Here’s the full code: https://t.co/XRyyaNXfSQ pic.twitter.com/HfDRiTUMi9

— Ole Begemann (@olebegemann) October 29, 2019
FavoriteTweet  olebegemann 
october 2019 by mjtsai
Twitter
(1/2) Swift doesn’t support custom ternary operators, but we can fake them:

1. Use a precedence group to make the operator left- (or right-) associative. This allows you to use multiple operators in the same expression. https://t.co/5QmXF59Osy

— Ole Begemann (@olebegemann) October 29, 2019
FavoriteTweet  olebegemann 
october 2019 by mjtsai
Twitter
There have been discussions on the Swift forum about introducing some kind of ExpressibleByTupleLiteral protocol (or similar), which might turn this:

CGSize(width: 100, height: 200)

into this:

(100, 200)

(assuming the type is inferable from context).

— Ole Begemann (@olebegemann) October 28, 2019
FavoriteTweet  olebegemann 
october 2019 by mjtsai
Twitter
I’m not recommending this, but it is kind of nice. pic.twitter.com/c8npBSzJdv

— Ole Begemann (@olebegemann) October 28, 2019
FavoriteTweet  olebegemann 
october 2019 by mjtsai
Twitter
Background: when you create a CIImage (or UIImage, or CGImage) directly from a DNG file, it only seems to load the embedded preview JPG, which is only 852×640 px. To get the full resolution data, you have to go through CIRAWFilter.

— Ole Begemann (@olebegemann) October 22, 2019
FavoriteTweet  olebegemann 
october 2019 by mjtsai
Twitter
Has anybody successfully processed a RAW/DNG photo using Core Image on the iOS simulator? It seems CIFilter.init(imageData:options:) doesn’t work on the simulator (outputImage is nil). I’d be grateful for any hints. https://t.co/mxEbNw0w0x

— Ole Begemann (@olebegemann) October 22, 2019
FavoriteTweet  olebegemann 
october 2019 by mjtsai
Twitter
Great summary by @brentdax on Swift’s current policy for making source-breaking language changes: https://t.co/JmZ8tgUElh

— Ole Begemann (@olebegemann) October 15, 2019
FavoriteTweet  olebegemann 
october 2019 by mjtsai
Twitter
Today I learned that if you put a folder named “Dropbox” in your iCloud Drive, iCloud refuses to upload it. It only says “Ineligible”. pic.twitter.com/OP67nxAHcw

— Ole Begemann (@olebegemann) July 31, 2019
FavoriteTweet  olebegemann 
july 2019 by mjtsai
Twitter
Function builders will not be a public feature in Swift 5.1 — presumably due to the limited time for design and implementation. https://t.co/WoVJfajNuM

— Ole Begemann (@olebegemann) July 3, 2019
FavoriteTweet  olebegemann 
july 2019 by mjtsai
Twitter
The hot reloading for SwiftUI Previews in Xcode 11 uses dynamic method replacement, Swift’s as yet unofficial version of swizzling: https://t.co/fCQJsky5uR

— Ole Begemann (@olebegemann) June 10, 2019
FavoriteTweet  olebegemann 
june 2019 by mjtsai
Twitter
The Photos framework now has a smart album type called “unable to upload”, so I assume the Photos app will also get such an album in iOS 13. https://t.co/8xWOyW34xm

— Ole Begemann (@olebegemann) June 6, 2019
FavoriteTweet  olebegemann 
june 2019 by mjtsai
Twitter
The new Apple monitor doesn’t seem to have speakers or a camera built in. https://t.co/IUkDaWlOUe

— Ole Begemann (@olebegemann) June 4, 2019
FavoriteTweet  olebegemann 
june 2019 by mjtsai
Twitter
It took us a little longer than expected, but I’m really happy how the book turned out. I’m particularly fond of our new chapter on enums. (Who knew you could write almost 50 pages on the topic?) https://t.co/nL9WRwydaX

— Ole Begemann (@olebegemann) May 31, 2019
FavoriteTweet  olebegemann 
may 2019 by mjtsai
Twitter
TIL you can use dynamicCallable in Swift as a hacky syntax for creating stringly typed dictionaries without quotes and square brackets. The argument labels become the dictionary’s keys. 🤣 h/t @tony_allevato https://t.co/8aRemT5spR pic.twitter.com/h49OFqmSUY

— Ole Begemann (@olebegemann) April 23, 2019
FavoriteTweet  olebegemann 
april 2019 by mjtsai
Twitter
The Library Evolution document mentions a future “@inlinableAccess” attribute that would allow that, with the limitation that replacing a stored property with a computed one wouldn’t be a resilient change (which it currently is AFAIK). https://t.co/u4oKvV9mrn

— Ole Begemann (@olebegemann) April 22, 2019
FavoriteTweet  olebegemann 
april 2019 by mjtsai
Twitter
And Cmd+Z works at any time when you messed up.

— Ole Begemann (@olebegemann) April 3, 2019
FavoriteTweet  olebegemann 
april 2019 by mjtsai
Twitter
How to fix a previous (not yet pushed) commit in GitUp:

1) Commit fix on HEAD.
2) Hit D (= down) repeatedly until the fix is on top of the to-be-fixed commit.
3) F (= fix up) merges the fix commit into the one below it.
4) E (= edit) to edit commit message if necessary.

— Ole Begemann (@olebegemann) April 3, 2019
FavoriteTweet  olebegemann 
april 2019 by mjtsai
Twitter
GitUp is extremely good at merging, rebasing, stashing, editing/rewriting/reordering commits etc. Super fast. Native undo is awesome. The commit UI is also very good. It’s not so great for navigating in a single branch and looking at changes. https://t.co/4Lw9vRVJUx

— Ole Begemann (@olebegemann) April 3, 2019
FavoriteTweet  olebegemann 
april 2019 by mjtsai
Twitter
Apple changed the keyboard shortcuts in 10.14.4. Space bar is now Quick Look (yay!) and playback for videos/Live Photos is Alt+Space. Plus, these commands now have menu items, which means you can change the shortcuts in System Preferences. I don’t think this was possible before. https://t.co/GbzZyylv05

— Ole Begemann (@olebegemann) March 28, 2019
FavoriteTweet  olebegemann 
march 2019 by mjtsai
Twitter
I love the feel of the 2018 Macbook Pro keyboard. I really enjoy typing on it.
I hate the arrow key layout.
I hate the missing Esc key.
I’m meh on the touch bar.
I hope mine won’t fail (no problems so far, ~6 months in).

— Ole Begemann (@olebegemann) March 26, 2019
FavoriteTweet  olebegemann 
march 2019 by mjtsai
Twitter
Swift tip: you can include file/line/function information in your custom error types. This makes the definition of new error cases a little wordier, but crucially, the callsite remains very clean. pic.twitter.com/FB93nCtWWY

— Ole Begemann (@olebegemann) March 14, 2019
FavoriteTweet  olebegemann 
march 2019 by mjtsai
Twitter
The integers in parentheses specify the minimum number of digits for that field. And it’s .month(.two) instead of .month(2) because “month” is an alphanumeric field: you can also specify .narrow (“M”), .abbreviated (“Mar”), or .full (“March”).

— Ole Begemann (@olebegemann) March 12, 2019
FavoriteTweet  olebegemann 
march 2019 by mjtsai
Twitter
Fun with string interpolation in Swift 5: type-safe date format strings. Not very readable with all the escaping noise, but I kind of like it. pic.twitter.com/kWqmmYBzwY

— Ole Begemann (@olebegemann) March 12, 2019
FavoriteTweet  olebegemann 
march 2019 by mjtsai
Twitter
Switching AirPods between devices is very much like activating AirPlay. The first attempt fails about 25 % of the time, and when it works it takes five seconds when it should take less than one. Apple’s proprietary protocol may be better than Bluetooth, but that’s too low a bar.

— Ole Begemann (@olebegemann) February 14, 2019
FavoriteTweet  olebegemann 
february 2019 by mjtsai
Twitter
Developers, if your Mac app supports multiple documents/windows, please include a “New Window” command in your Dock menu. E.g. Firefox doesn’t have this. I’d also like New Playground and New Project in Xcode. pic.twitter.com/TRSBXEzK13

— Ole Begemann (@olebegemann) February 1, 2019
FavoriteTweet  olebegemann 
february 2019 by mjtsai
Twitter
Backticks ('`Type`') are another good alternative (that I keep forgetting exists). pic.twitter.com/ILz3ODm07V

— Ole Begemann (@olebegemann) January 30, 2019
FavoriteTweet  olebegemann 
january 2019 by mjtsai
Twitter
Swift doesn’t like nested types named 'Type'. I usually use 'Kind' as an alternative name for this kind (hah!) of type. It just occurred to me that “type” and “kind” have very different meanings in type theory. pic.twitter.com/cEexc8kiiJ

— Ole Begemann (@olebegemann) January 30, 2019
FavoriteTweet  olebegemann 
january 2019 by mjtsai
Twitter
Stack allocation doesn’t work yet for Objective-C blocks. I suspect that also applies to wrappers like DispatchQueue.sync. https://t.co/ESRi3YKa3H

— Ole Begemann (@olebegemann) January 19, 2019
FavoriteTweet  olebegemann 
january 2019 by mjtsai
Twitter
“It’s this really weird thing that only happens in software. A hobbyist ends up maintaining some kind of critical infrastructure while they don’t want to. It’s insane.” https://t.co/Cy072yIhbI

— Ole Begemann (@olebegemann) December 29, 2018
FavoriteTweet  olebegemann 
december 2018 by mjtsai
Twitter
Photos for Mac, the only image browsing app that doesn’t use the space bar for switching between grid and full size view.

— Ole Begemann (@olebegemann) December 17, 2018
FavoriteTweet  olebegemann 
december 2018 by mjtsai
Twitter
Imagine you’re in a restaurant and all of a sudden your iPhone (on silent) starts ringing at full volume because your sleeve activated Find my iPhone on the watch.

— Ole Begemann (@olebegemann) December 12, 2018
FavoriteTweet  olebegemann 
december 2018 by mjtsai
Twitter
My Apple Watch is extremely prone to accidental touches caused by long sleeves or gloves. Super annoying.

— Ole Begemann (@olebegemann) December 12, 2018
FavoriteTweet  olebegemann 
december 2018 by mjtsai
Twitter
I should clarify because this topic of Dictionary encoding itself as an “array” came up on the Swift forums again: https://t.co/35RRGqj6m6. The fact that RawRepresentable keys (with a String or Int RawValue) don’t use a keyed container can be seen as an oversight. … https://t.co/rjnBaLHEzd

— Ole Begemann (@olebegemann) December 11, 2018
FavoriteTweet  olebegemann 
december 2018 by mjtsai
Twitter
What do we think of this?

extension Array: Error
where Element: Error { }

It would allow you to pass an array of errors as a single Error parameter. It would need a custom implementation of LocalizedError to format a good errorDescription, of course.

— Ole Begemann (@olebegemann) December 5, 2018
FavoriteTweet  olebegemann 
december 2018 by mjtsai
Twitter
Think twice before conforming a standard library or Foundation type to a built-in protocol (e.g. extension Range: Codable). You risk collisions with other code that does the same thing, or if the stdlib adds the conformance later. https://t.co/mOgIRtLrSh

— Ole Begemann (@olebegemann) November 30, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
I used the same technique to define a helper class that acts as a text field delegate in an initializer: https://t.co/YkNgN4I6QU https://t.co/OzINCMjsXW

— Ole Begemann (@olebegemann) November 21, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
I can’t recommend this book highly enough. So well written! Designing Data-Intensive Applications by @martinkl. https://t.co/e2LbEOdy7t pic.twitter.com/LMWColGjoq

— Ole Begemann (@olebegemann) November 10, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
The main advantage of OptionSet over a Set
— Ole Begemann (@olebegemann) November 7, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
Seeing throws and Result as “different corners of the design space” by @jckarter: https://t.co/Q3RuIaSLI7

throws: large distance between error source and handler ⇒ loose coupling, untyped, propagation.

Result: intended to be handled immediately ⇒ regular return value, typed

— Ole Begemann (@olebegemann) November 7, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
Challenge: write a Swift extension for Sequence that destructures the sequence into head and tail, i.e. returns a tuple of the first element and the rest (or nil if the sequence is empty).

Make sure it works correctly with self-consuming sequences that can only be iterated once. pic.twitter.com/kc1cdjgs2i

— Ole Begemann (@olebegemann) November 6, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
The original behavior (allowing the elements in a let array to be mutated) was always seen as undesirable, at least that’s how I interpret the commit history. Here’s a relevant commit by @DaveAbrahams from May 2014, before the public release: https://t.co/NcY2CE8Efw pic.twitter.com/AKuzj1RkKs

— Ole Begemann (@olebegemann) November 5, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
It’s always sad to see old URLs die, but paying $50/yr in perpetuity just to keep the URLs alive is a bit much. I’ve been thinking for years about mirroring my best photos on my own site, so maybe this will give me the nudge to finally do it.

— Ole Begemann (@olebegemann) November 1, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
Flickr is restricting free accounts to 1000 photos. If you have more, you have until February 5 to buy a $50/year Pro account or delete the photos you choose. After Feb 5, Flickr will delete your oldest photos until you have less than 1000. https://t.co/dBmifnguNZ

— Ole Begemann (@olebegemann) November 1, 2018
FavoriteTweet  olebegemann 
november 2018 by mjtsai
Twitter
Tim Cook on iCloud encryption: “We can decrypt iCloud data because some users expect us to help them when they lose or forget their password. It’s hard to say when, but I believe we will change this practice in the future, and we won’t have a key for user data in iCloud anymore.”

— Ole Begemann (@olebegemann) October 25, 2018
FavoriteTweet  olebegemann 
october 2018 by mjtsai
Twitter
Go hits the concurrency nail right on the head: https://t.co/TldG8MctbW

“Go is the mainstream language that gets concurrency really right by relying on two key principles:
1. Seamless light-weight preemptive concurrency across cores
2. CSP and sharing by communicating“

— Ole Begemann (@olebegemann) October 11, 2018
FavoriteTweet  olebegemann 
october 2018 by mjtsai
Twitter
A potential performance trap to look out for: adding the seemingly innocuous `?? []` to `optionalSequence?.reversed()` may select a different overload where reversed() is now O(n) (rather than effectively free). Spotted by @AirspeedSwift. https://t.co/As5CFvetVA

— Ole Begemann (@olebegemann) October 10, 2018
FavoriteTweet  olebegemann 
october 2018 by mjtsai
Twitter
As I understand it, Apple doesn’t need module format stability to ship Swift frameworks because they can update compiler and SDK in sync.

— Ole Begemann (@olebegemann) October 9, 2018
FavoriteTweet  olebegemann 
october 2018 by mjtsai
Twitter
Has Apple published the documentation for the App Store connect API? I can’t find it (only the WWDC session where it was introduced, https://t.co/2dUCMvl1to).

— Ole Begemann (@olebegemann) October 1, 2018
FavoriteTweet  olebegemann 
october 2018 by mjtsai
Twitter
The Core Data model Apple is using in the Photos framework on iOS. pic.twitter.com/nCdouVZze6

— Ole Begemann (@olebegemann) September 28, 2018
FavoriteTweet  olebegemann 
september 2018 by mjtsai
Twitter
Nice tip by @gregtitus: you can use editor placeholders in Xcode to prevent compile errors for things you still have to fill in while writing new code: https://t.co/GaySe9bjlo.

— Ole Begemann (@olebegemann) September 25, 2018
FavoriteTweet  olebegemann 
september 2018 by mjtsai
Twitter
TIL that (NS)Operation.isReady and .isExecuting/.isFinished are not exclusive states.
• isReady remains true while the operation is executing or finished.
• isReady is only false while the operation is waiting for dependencies to finish.

— Ole Begemann (@olebegemann) September 11, 2018
FavoriteTweet  olebegemann 
september 2018 by mjtsai
Twitter
The fucking Touch Bar may finally bring me to learn 10-finger touch typing by the book. I have *so* many accidental touches (often destructive) with my left pinky and ring finger while I type with index and middle fingers.

— Ole Begemann (@olebegemann) August 24, 2018
FavoriteTweet  olebegemann 
august 2018 by mjtsai
Twitter
Can’t believe it took me this long to get a copy of this for my library. pic.twitter.com/bMW01uoYqf

— Ole Begemann (@olebegemann) August 23, 2018
FavoriteTweet  olebegemann 
august 2018 by mjtsai
Twitter
In an XCUITest, an empty UITextField’s `value` (XCUIElementAttributes.value) is equal to the text field’s placeholder text instead of being nil or the empty string. This behavior makes absolutely no sense to me. pic.twitter.com/poxkY7NIdn

— Ole Begemann (@olebegemann) August 10, 2018
FavoriteTweet  olebegemann 
august 2018 by mjtsai
Twitter
My only wish for the next Safari version is for the scroll indicator to be clearly visible on all pages, regardless of page background colors, scroll position and zoom level.

— Ole Begemann (@olebegemann) August 2, 2018
FavoriteTweet  olebegemann 
august 2018 by mjtsai
Twitter
Even if you’re not a @pointfreeco subscriber, it’s worth taking the 40 minutes to watch their (free) “A Tour of Point-Free” episode. Lots of great ideas and inspiration for writing safer code, taking advantage of playgrounds, etc. https://t.co/VY2DGmc61J

— Ole Begemann (@olebegemann) August 1, 2018
FavoriteTweet  olebegemann 
august 2018 by mjtsai
Twitter
Every source editor, IDE and Git client should have an option to open the current file/line/selection at the current revision on GitHub/Bitbucket/GitLab (or copy a link). Makes sharing a specific code snippet so much easier.

— Ole Begemann (@olebegemann) July 29, 2018
FavoriteTweet  olebegemann 
july 2018 by mjtsai
Twitter
Cool to see my friend @joergjacobsen’s app Eye Friendly being mentioned on @atpfm (ep. 284 at 1:13:27). I use it all the time. https://t.co/kuheiVP7L5 pic.twitter.com/6GksFfv5lZ

— Ole Begemann (@olebegemann) July 27, 2018
FavoriteTweet  olebegemann 
july 2018 by mjtsai
Twitter
Chris MacAskill’s “secret call to Andy Grove that may have helped Apple buy NeXT”: https://t.co/WsABHCtcai. What a great story. (Via @mjtsai, who writes one of my favorite blogs: https://t.co/E22LGgg5Pn.)

— Ole Begemann (@olebegemann) July 26, 2018
FavoriteTweet  olebegemann 
july 2018 by mjtsai
Twitter
Could we see an 8-core iMac this fall? https://t.co/sMqBmpcF5L

— Ole Begemann (@olebegemann) July 25, 2018
FavoriteTweet  olebegemann 
july 2018 by mjtsai
Twitter
A switch statement where each case tests an independent condition that doesn’t have to refer to the expression being switched over. It’s basically a different way of writing if { } else if { } …

Probably not a good idea to use this in real code.https://t.co/cHS5yeQe7F pic.twitter.com/MZRWG1lJt5

— Ole Begemann (@olebegemann) July 23, 2018
FavoriteTweet  olebegemann 
july 2018 by mjtsai
Twitter
By the way, starting with Swift 5, `Float(15.7)` will be treated as `15.7 as Float` (SE-0213, https://t.co/HPFMJrbBrz). It doesn’t change the outcome, but it will no longer use the v: Double initializer.

— Ole Begemann (@olebegemann) July 21, 2018
FavoriteTweet  olebegemann 
july 2018 by mjtsai
Twitter
The new “Find and Select Next” (⌥⌘G) and “Select Next Occurrence“ (⌥⌘E) commands in Xcode 10b3 make multi-cursor editing even more useful. 👏

— Ole Begemann (@olebegemann) July 4, 2018
FavoriteTweet  olebegemann 
july 2018 by mjtsai
Twitter
Things you can Cmd/Option+click on in Xcode:
• identifiers
• types

Things you can’t (even though it would often be useful):
• keywords
• attributes (like @­escaping)
• operators (like ==)
• other syntax elements (like braces)

— Ole Begemann (@olebegemann) June 28, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
Twitter
I’ve been using Cocoa for more than 10 years and I still don’t fully understand how run loops work.

— Ole Begemann (@olebegemann) June 27, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
Twitter
Do you use libextobjc in your Obj-C projects and see new nullability warnings in Xcode 10 when using @­keypath? We fixed this with a creative (I think) hack: https://t.co/cSeFX0k0q2 pic.twitter.com/0t2wjq8a68

— Ole Begemann (@olebegemann) June 26, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
Twitter
Interesting use case for CaseIterable in the SwiftShot WWDC session (at 30:45): calculating the minimum number of bits needed to serialize a value. https://t.co/MeVLwgmsx1 pic.twitter.com/s7VJU7PVXt

— Ole Begemann (@olebegemann) June 18, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
Twitter
Did Apple swap these two keys in iOS 12 or am I going crazy? My muscle memory is not adjusting. pic.twitter.com/K54m05bOaJ

— Ole Begemann (@olebegemann) June 15, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
Twitter
“Convenience initializers call a designated initializer on the *dynamic* type, not the same class. This is a design Swift got from Objective-C, and it's what allows convenience inits to be inherited.” https://t.co/hatQAsDkfy

— Ole Begemann (@olebegemann) June 14, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
Twitter
FWIW, here’s a current forum thread about this problem (but no solution): https://t.co/0W0HpuPR9D

— Ole Begemann (@olebegemann) June 14, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
Twitter
Problem: a manual CaseIterable implementation risks becoming incorrect as a type evolves. The compiler doesn’t catch this.

Solution: a dummy function whose only purpose is to produce a compile error on (almost) the correct line when a new case is added.

It’s ugly but it works. pic.twitter.com/7CrQ6Y4p27

— Ole Begemann (@olebegemann) June 8, 2018
FavoriteTweet  olebegemann 
june 2018 by mjtsai
« earlier      
per page:    204080120160

Copy this bookmark:



description:


tags: