Yeah, we do. However, since our primary audience of people we are talking to are on a Mac/iOS device, it doesn't really matter. And when we are on a non-Mac, we know what the square box symbol is supposed to be.
First off, a struct is not an object. Structs in Swift, like many languages, are value types. They have the same packing structure in Swift as in C, especially in the example that I gave. You can read more about them…
Yes, the var should have been inout. It had an affect on the release build performance (twice as fast), but not the debug build. I've updated the blog post. The performance problem is regarding all retain/releases…
> I can promise you my function doesn't write to disk, doesn't output to the screen, etc. You cannot promise the same with your function. WHAT?! Your type signatures have absolutely no assurances with regards to side…
> Please note I didn't throw out add(3,4)==7, but instead pointed out it's terribly inadequate as a test. Additional testing tools must be employed; unit testing alone of this kind is not enough. I don't follow what you…
There are actually many poor claims you made in your posts about "good tests". > I'm aware that addition is a toy example, but suppose we want to test our implementation: > Except for very simple verification, to…
I'm just going to reply to one part with an example of the problem. > I think this is somewhat incorrect. You should never just be type-casting your inputs. (In fact, I think it should ideally be impossible to do so…
Yeah, we do. However, since our primary audience of people we are talking to are on a Mac/iOS device, it doesn't really matter. And when we are on a non-Mac, we know what the square box symbol is supposed to be.
First off, a struct is not an object. Structs in Swift, like many languages, are value types. They have the same packing structure in Swift as in C, especially in the example that I gave. You can read more about them…
Yes, the var should have been inout. It had an affect on the release build performance (twice as fast), but not the debug build. I've updated the blog post. The performance problem is regarding all retain/releases…
> I can promise you my function doesn't write to disk, doesn't output to the screen, etc. You cannot promise the same with your function. WHAT?! Your type signatures have absolutely no assurances with regards to side…
> Please note I didn't throw out add(3,4)==7, but instead pointed out it's terribly inadequate as a test. Additional testing tools must be employed; unit testing alone of this kind is not enough. I don't follow what you…
There are actually many poor claims you made in your posts about "good tests". > I'm aware that addition is a toy example, but suppose we want to test our implementation: > Except for very simple verification, to…
I'm just going to reply to one part with an example of the problem. > I think this is somewhat incorrect. You should never just be type-casting your inputs. (In fact, I think it should ideally be impossible to do so…