Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
goto11
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
19 ms
·
151.
▲
by
goto11
4y ago
In Scandinavia, the older generations mostly know these characters from comic magazines rather than the animated cartoons, as those was rarely shown on TV. The Disney magazines was called Donald Duck but also had stories with other Disney c
152.
▲
by
goto11
4y ago
I was surprised to discover that Mickey Mouse was more popular and well-known in the US than Donald Duck. Come on, Donald Duck is a much more fun and interesting character!
153.
▲
by
goto11
4y ago
> Pure being the default would lead to most functions being written to be pure. More likely it would lead to most functions looking like they are pure, whether they are actually pure or not. For example, any function written before the &
154.
▲
by
goto11
4y ago
> The relational model itself doesn't care what "values" are. Maybe I misunderstand what you are arguing, but the relational model is defined in terms of values, sets, and domains (data types), but of course the domains ch
155.
▲
by
goto11
4y ago
Still wouldn't work, since there is no way for the compiler to distinguish between a pure function and an impure function which just don't have an annotation - e.g. a third-party library written before "impure" was intro
156.
▲
by
goto11
4y ago
Typescript does not support nominal typing except for enums. It can be emulated by giving types an unique property, but this is kind of a hack.
157.
▲
by
goto11
4y ago
Doesn't fit with the Typescript philosophy though: It should be possible to gradually add Typecript annotations to existing JavaScript code. It wouldn't work with 3rd party libraries either. If you want something like this you mig
158.
▲
by
goto11
4y ago
Tolkien didn't like how Shakespeare portrayed faeries in A Midsummer Nights Dream. But Shakespeare's faeries are much closer to the original folklore - they are mischievous and dangerous and wantonly play with humans leading to ma
159.
▲
by
goto11
4y ago
On the other hand the Rust syntax have gradually moved closer to exceptions, now with the "?" operator which automatically unpack the result or propagates the error value. This feels awfully close to exceptions, even if it in theo
160.
▲
by
goto11
4y ago
I doubt querying JSON or XML or some other embedded structured format would be faster than querying normalized data. It might be true in some special cases, but certainly not in the general case of ad-hoc queries across nested data structur
161.
▲
by
goto11
4y ago
The question isn't who said what when, the question is what reasoning holds today. Codds argument was simply that if we allow tables embedded inside fields and we want to query across multiple "layers" of embedded tables, w
162.
▲
by
goto11
4y ago
In the context of the relational model, simple and composite refer to how they are treated by by the relational operators. You can't select individual bits of an integer (without special-purpose operators) which means an integer is a s
163.
▲
by
goto11
4y ago
> in particular, its historically limited support for structured data within fields This is not particular to SQL though, and is the rationale behind the first normal form. Codd argued that any complex data structure could be represented
164.
▲
by
goto11
4y ago
It should be "thinking in relational algebra but writing in C#". Arguable Linq with C# represent relational algebra better than SQL.
165.
▲
by
goto11
4y ago
The pattern I'm most familiar with is using type constructors: type Shape = Square Int | Circle Int and then pattern matching: print (Square size) = .. print (Circle radius) = ... In Typescript this would be somethin
166.
▲
by
goto11
4y ago
The event type could just be exposed as a regular property so you could write `element.onclick.add((ev => ...)` so you would get static typing without any need for magic strings. Magic string are use all over JavaScript for different pur
167.
▲
by
goto11
4y ago
It is not just to support the DOM it is also frameworks like JQuery, React, Vue etc. For example the 'options' parameter is a common pattern where an object with a set of properties are provided to override a some default behavior
168.
▲
by
goto11
4y ago
> That said, I don't really have an opinion on who is at fault here - coders for writing overly elaborate types, or Typescript for allowing them. Backwards compatibility is to blame. Typescript was designed to support a number of pa
169.
▲
by
goto11
4y ago
> Does it say 'this is clearly just one guy'? It says the majority of the plays are likely written by the same person, since Shakespeare have a distinct "voice" which is clearly different form other contemporary playw
170.
▲
by
goto11
4y ago
William Shakespeare was the author of those plays, if you mean plays like Hamlet, Romeo and Juliet etc. The answer is completely settled, since there is no serious argument that we wasn't, outside of fanciful conspiracy theories. There
171.
▲
by
goto11
4y ago
> the average human mortality rate is about 1% per year Are you talking about death from any reason? Because I don't think anyone expect the Qatar authorities to comment on someone dying from a water-skiing accident or from old age.
172.
▲
by
goto11
4y ago
Unlikely. I believe it started as a hypothesis to explain the many spelling errors in scam mails, but I don't think this have ever been confirmed to be intentional. Hanlons Razor is probably appropriate here.
173.
▲
by
goto11
4y ago
But when he says he writes for heterosexuals he is being literal!
174.
▲
by
goto11
4y ago
I think architects are certainly aware of the importance of architecture, and most would love to make beautiful quality architecture. But in the end architects are hired by someone who decide the budget, and cookie-cutter is just cheaper.
175.
▲
by
goto11
4y ago
I was half joking, because software development is largely the process of developing an unambiguous specification - just in the form of executable code.
176.
▲
by
goto11
4y ago
So the only thing a developer have to deliver is an unambiguous specification of what the program is supposed to do!
177.
▲
by
goto11
4y ago
In any statically typed language I know, it is possible to create invalid values which looks correct to the type checker. E.g. if a function takes an interface as parameter type, you can create a dummy implementation which throw exceptions
178.
▲
by
goto11
4y ago
This is true - unit tests generally does not test all possible inputs. They test some representative examples and edge cases. In most cases there are infinitely many possible inputs, and you get diminishing returns the more cases you test.
179.
▲
by
goto11
4y ago
Sure, static typing will catch such issues. But there is still no guarantee that the foo function (or the function calling foo) works correctly just because it passes the type checker. If you have unit tests (or other types of automated tes
180.
▲
by
goto11
4y ago
I'm saying static type checking does not replace any unit tests, because you wouldn't write tests which only checks for "the wrong types" in the first place. You should check for valid behavior - i.e. is the output c
More ›