Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
owensd
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
5 ms
·
1.
▲
by
owensd
10y ago
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.
2.
▲
by
owensd
12y ago
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 here: https:/
3.
▲
by
owensd
12y ago
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 though; not the
4.
▲
by
owensd
12y ago
> 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 effects. T
5.
▲
by
owensd
12y ago
> 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 ar
6.
▲
by
owensd
12y ago
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 exclud
7.
▲
by
owensd
12y ago
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 without the comp