Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
afthonos
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
33 ms
·
361.
▲
by
afthonos
12y ago
The code works, but the type of the generic is not guaranteed at compile time. FunctorResult could be anything at all. There is no compile-time obligation for the code to return a Dictionary<KeyType, P>. The more canonical example of
362.
▲
Immutable Swift
(nomothetis.svbtle.com)
5 points
by
afthonos
12y ago
|
0 comments
363.
▲
by
afthonos
12y ago
Thanks for the Box suggestion; I'll try it and see how it works for me. I wouldn't have thought of that workaround.
364.
▲
by
afthonos
12y ago
That doesn't actually work, because you're limiting the return type of the method in the implementation of the functor. So by implementing that protocol, you could have one mapping from Int to String (say), but not another from
365.
▲
by
afthonos
12y ago
Let's begin with the array. Imagine I have an array of characters: var a = ['a', 'b', 'c'] I'd like instead to have the index of their position in the alphabet. That's another array of the same l
366.
▲
by
afthonos
12y ago
Author here. To be fully honest, it's somewhere between the two. Yes, I'm aware of the irony of the statement. But what I failed to make clear in the post is that the code in the last two examples passes the type checker. Where it
367.
▲
by
afthonos
12y ago
Yeah, that's why I said the crashes gave me hope. It seems they are trying to support those use cases, but haven't worked out the kinks. I'm totally fine with that.
368.
▲
Smashing Swift
(nomothetis.svbtle.com)
281 points
by
afthonos
12y ago
|
143 comments
369.
▲
by
afthonos
13y ago
All in all great article, but it seriously lost credibility with "Talents are innate and are the building blocks of great performance. Knowledge, experience, and skills develop our talents, but unless we possess the right innate talen
370.
▲
by
afthonos
13y ago
What I really hate about these sorts of stories and attending discussions is that we all pretend we know what "free will" is, when no one has ever come up with satisfying definition (just look at the Wikipedia page). My humble opi
371.
▲
by
afthonos
13y ago
What truth there is in this article amounts to a (significantly outdated) survey of the state of women in society. All it presents is correlations. It's a mathematical fact that you can know nothing of causal effects between correlat
372.
▲
by
afthonos
14y ago
> Now, I prefer #1, but willing to settle for #2. You seem to reject both? I completely embrace 2, as you do. I just don't think that live tracking of legislation is the way to do it, and I think that it has dangerous pitfalls. > If
373.
▲
by
afthonos
14y ago
I am less and less convinced that more information is the solution. If it were, we would already have the most enlightened era of government the world has ever known, since far more information is available now than there ever has been. Wha
374.
▲
by
afthonos
14y ago
I was unclear. I am not alarmed by the data being available. In fact, I also mentioned that it's already mostly available. I am concerned with the idea that we need to pay close attention to the process. > The idea that one must hire
375.
▲
by
afthonos
14y ago
Switzerland does not have direct democracy; it is simply close to it. Switzerland is also a country with 7 million people, not 350. Yes, that changes things. We are more diverse, and more geographically and culturally separated, and that
376.
▲
by
afthonos
14y ago
This idea keeps cropping up, and it terrifies me beyond all reason. It's roughly as palatable as a direct democracy, because in effect, that's what it advocates. People who deeply care about the law are already able, and willing, to find th
377.
▲
by
afthonos
15y ago
Rocket surgery is a field I dearly want to see created. :-D
378.
▲
by
afthonos
15y ago
Agreed. And I would argue that programming languages give as structured a way to do this unambiguously as we currently have. As languages improve, we can improve what the computer can interpret unambiguously (or at all), but that is a long
379.
▲
by
afthonos
15y ago
I think it's interesting that he (implicitly) laments the lack of loyalty. Current corporate culture is predicated on completely at-will employment: you can get laid off whenever management thinks it's important to "downsize" and "go lean"—