Post

Replies

Boosts

Views

Activity

Comment on Swift Playground: "Expression are note allowed at the top level"
A macOS Command Line Tool is almost like a Playground if you want to play with just Swift coding basics (no UIKit or SwiftUI). It's easier to write Swift code without having to spin up an iOS Simulator. Another benefit is you can debug the code with a breakpoint (blue flag) and you can step through it line by line to watch it run execute each command.
Dec ’21
Comment on Class is implemented in both /System/Library/... and /private/var/...
For Objective-C classes, Apple has said in their documentation to use 3-letter prefixes to prevent collisions. 2-letter prefixes are also reserved for Apple. "In order to keep class names unique, the convention is to use prefixes on all classes. You’ll have noticed that Cocoa and Cocoa Touch class names typically start either with NS or UI. Two-letter prefixes like these are reserved by Apple for use in framework classes." "Your own classes should use three letter prefixes. These might relate to a combination of your company name and your app name, or even a specific component within your app. As an example, if your company were called Whispering Oak, and you were developing a game called Zebra Surprise, you might choose WZS or WOZ as your class prefix." Programming with Objective-C Conventions
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’21