Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
swift
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
301.
▲
by
swift
14y ago
Regarding poor_style(), I've never understood this objection (and indeed I prefer the block style you complain about there). Can't your editor fix this up for you in a few keystrokes? This is the sort of thing that an editor should make eas
302.
▲
by
swift
14y ago
You cannot be serious. You cannot go through life letting people walk all over you and abuse your trust. Your approach isn't "better than most alternatives"; it's encouraging him to accept the role of victim. Life is too short for THAT.
303.
▲
by
swift
14y ago
In static languages this really isn't a big deal, since you can dispatch based on type. Things definitely get more awkward if you can do things like define new types at runtime, though.
304.
▲
by
swift
14y ago
If a .c file includes U x M .h files on average, where U is a number from 0 to 1, then the work we expect to do at compilation time is proportional to U x (N x M). This is still O(N x M).
305.
▲
by
swift
14y ago
A republic is nine wolves and a sheep voting on who will decide what's for dinner. =)
306.
▲
by
swift
14y ago
Absolutely. The claim that the form of government in the United States is a "democracy" is one of the most impressive propaganda successes I've seen.
307.
▲
by
swift
14y ago
> that they failed is a fact and that makes all their properties, including lack of null pointers, of questionable utility in the craft of actually writing useful software. This seems like something akin to the just world fallacy. So fa
308.
▲
by
swift
14y ago
> There are only two ways to handle this - return values and exceptions - and they differ in style more than in functionality. "There are only two" is a bit strong. Off the top of my head I can think of conditions and restarts in e.g. C
309.
▲
by
swift
14y ago
While conventions are useful, different conventions are appropriate for writing different kinds of code, and one should use the right tool for the job. Understanding code written in a functional style is something a good developer should be
310.
▲
by
swift
14y ago
If anything it's quite the opposite; most OOP languages are extremely limiting for DSL creation as compared to most FP languages.
311.
▲
by
swift
14y ago
As with many corner cases of English grammar, I don't think there is such a decisive answer here that we can call him absolutely right or absolutely wrong, but FWIW his approach ('a' vs 'an' selected based upon the pronunciation of the acro
312.
▲
by
swift
14y ago
Rape jokes aren't funny. Even when they involve terrible people like the operators of this site.
313.
▲
by
swift
14y ago
Strange explanation of the word "variable" in here. It doesn't mean "many" - more like "changeable". It's the opposite of "constant".
314.
▲
by
swift
14y ago
"Smart data structures and dumb code works a lot better than the other way around." An interesting assertion. In your link Guy Steele observes the duality between objects (where it's easy to add new data types but harder to add new operatio
315.
▲
by
swift
14y ago
I am unable to reply to my sibling poster, but I believe what you're saying is that having a hideous and unreadable syntax that forces the use of typedefs just so others can understand what you have written is a sign of deep, unfixable badn
316.
▲
by
swift
14y ago
You say "we" as if you were speaking for all artists, but you do not speak for me. In my view, the current model of selling a copy of a work to a customer as if it were a scarce good was dubious in the past and is downright unsupportable no
317.
▲
by
swift
14y ago
I totally agree with most of this list but I just wanted to let you know that the iPhone does indeed include an alarm clock, and many other time-related utilities, as part of the Clock app. I don't have my iPad here with me, but if I recall
318.
▲
by
swift
15y ago
You must not have talked to anyone that uses templates extensively.
319.
▲
by
swift
15y ago
Yeah, neither can I, that's really bizarre. Shouldn't it extend Sum? (which doesn't appear to exist) Can anyone familiar with this design decision shed light on this?
320.
▲
by
swift
15y ago
This is just fantastic. Great work. I look forward to see how it evolves further.
321.
▲
by
swift
15y ago
I'm not sure I agree that learning multiple languages in the first 2 months of studies is a good approach. I think it's difficult to appreciate the advantages and disadvantages of a language until you've really used it for a while, and I'd
322.
▲
by
swift
15y ago
I know that some people feel they still need a watch, either as a status symbol or because they feel it's more subtle in a meeting to glance at your watch than your smartphone, and for them this might be great. For me, though? I can't say I
323.
▲
by
swift
15y ago
You seem to be implying that modern GUIs have reached a level of maturity that approximates perfection. I really think that's a bit of a stretch. Why would there be so much effort among technical people to avoid using GUIs, either by using
324.
▲
by
swift
15y ago
This is a great explanation of algebraic datatypes! The notion of one-hole context, its connection to differentiation, and its application to zippers is really interesting stuff. Another (much more detailed) discussion of it can be found he
325.
▲
by
swift
15y ago
It's currently at the Exploratorium, but I have no idea how long it'll remain there.
326.
▲
by
swift
15y ago
Haha, wow. Went to the Exploratorium today and saw this guy there with his sculpture. Now it's on the front page of Hacker News! What a coincidence. He said that when people ask him when he started building it, he replies "Well, I got up r
327.
▲
by
swift
15y ago
A bijective function (also called isomorphic) is a one-to-one mapping between the persons and the bikes (between the domain and codomain). That's the assertion made in the article - that a bijection and an isomorphism are the same thing.
328.
▲
by
swift
16y ago
Haven't seen this operator before; reminds me of angelic programming. (see eg. http://portal.acm.org/citation.cfm?id=1706339 ) This also seems like a very natural application of monads.
329.
▲
by
swift
16y ago
It seems to me that it DOES pretty trivially give you polymorphism; just change the function pointers in a struct and it behaves differently, while retaining the same type! Inheritance can be implemented, too, by copying function pointers a
330.
▲
by
swift
16y ago
Well, function pointers exist in C, though they are certainly a clumsy replacement for having methods (or first-class functions / closures / currying) built into the language.
More ›