A list of method declarations. Classes conforming to a protocol must implement any required methods and may implement any optional methods.

learn more… | top users | synonyms

2
votes
0answers
75 views

Binary protocol variability V3.0

Summary: Parsing an incoming stream of events from a binary communication protocol, if we have some variations in devices to support and would not like to have one huge switch to include everything. ...
4
votes
2answers
154 views

Binary protocol variability V2.0

Up-to-date Version of this question: Binary protocol variability V3.0 Summary of the problem: Parsing an incoming stream of events from a binary communication protocol, if we have some variations in ...
3
votes
3answers
311 views

Binary protocol variability

Please note: An updated solution is here Let’s imagine that we designed more or less universal firmware for a microcontroller unit to be used across multiple types of devices. So we have something ...
1
vote
1answer
92 views

Simple Text Prediction

This is a simple implementation of text prediction using a list of keywords and UITextChecker. This is working correctly, but I think I could have implemented ...
2
votes
1answer
61 views

Have I created the <mutableDeepCopying> protocol properly?

I’m working in Objective-C, SKSpriteKit and am trying to create a class which will work in both OS X and iOS for flexibility. I have just created a new protocol for my programs: ...
3
votes
1answer
57 views

Managing a wish list from an API

I have a class that I use to manage a list to/from an API in Swift. Using a clean code approach, I'm wondering if, how, and why I should change it when I have a class that uses it for just one or two ...
14
votes
1answer
2k views

Let's play some Swift Poker

Before you can do any sort of card game, you must first write some code to define your deck of cards. One thing I've noticed in looking at some of Apple's Swift interfaces is that they very much so ...