Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
goto11
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
16 ms
·
181.
▲
by
goto11
4y ago
Static typing certainly have many benefits, just as it has a number of drawbacks. But I'm not making a general argument about static versus dynamic typing, I'm just rejecting the specific argument that static typing saves you from
182.
▲
by
goto11
4y ago
How do you define a contract which guarantee that the result of `add(a, b)` is correct? Not just that the result is a number, but that it is the correct number? Of course `add()`is a silly example since this is already a built-in in any l
183.
▲
by
goto11
4y ago
You can also have bugs in statically typed languages. Perhaps not the trivial bug of passing a string instead of a number, but you still can have the (more likely) issue of passing the wrong number, i.e. a logical error. Lets say `add(a,
184.
▲
by
goto11
4y ago
> Static typing gives a good baseline of correctness. Not really. Lets say you have an `add(a, b)` function. Static typing can guarantee that the function returns a number, but not that it returns the correct number. So you need unit t
185.
▲
by
goto11
4y ago
The bug is in the function which passes a string instead of a dictionary. Presumably this function will work incorrectly, right? So the unit tests of that function will find the error. Unit tests which verifies a function has the correct be
186.
▲
by
goto11
4y ago
> Think of static typing as an autogenerated set of unit tests that ensure that for any given function, all arguments of the wrong type will be rejected. My point is that you wouldn't write such unit tests in the first place. Unit t
187.
▲
by
goto11
4y ago
> which led them to break in very (very, very) ugly ways due to unrelated changes. Sounds more like a problem with tight coupling than a problem with types per se. A function should not change behavior due to an "unrelated change&qu
188.
▲
by
goto11
4y ago
But why would you do that? Sounds like a waste of time. If some other function uses `add()` but pass an invalid argument, then this bug would be discovered by testing the function which pass the invalid argument. Presumably that function wo
189.
▲
by
goto11
4y ago
> You pass an int into a method that expects a string, what's the expected behavior? Probably an exception, depending on the language. E.g. if the method expects the argument to support the method "substring()" it would be
190.
▲
by
goto11
4y ago
You shouldn't write test to validate types in the fist place. Testing for the correct behavior should be enough. I like static typing, but his this is just a silly argument. If the program behaves correctly according to spec, how can t
191.
▲
by
goto11
4y ago
There are unit tests for the Linux kernel and even a kernel-specific unit-test framework. See: https://kernel.org/doc/html/latest/dev-tools/kunit/ Here is an article about the various ways Linux i
192.
▲
by
goto11
4y ago
> then just implement persistence layer There is two ways of thinking: 1) The database schema is the fundamental model of the business, and all application logic is built on top of that. 2) The application logic is the core and the datab
193.
▲
by
goto11
4y ago
"Lose coupling"
194.
▲
by
goto11
4y ago
> The European "dark ages" were named that by people who claimed to be "the enlightenment." No, the "dark ages" terminology is from the renaissance. Petrarch is named as the possible origin. They considered
195.
▲
by
goto11
4y ago
OK that is hilarious!
196.
▲
by
goto11
4y ago
You said: > If you look at the demographics of top 40 listeners today compared to forty years ago, the popularity of the hits are more narrowly confined to teens and young adults So how do I look at these demographics and confirm this cl
197.
▲
by
goto11
4y ago
> If you look at the demographics of top 40 listeners today compared to forty years ago, the popularity of the hits are more narrowly confined to teens and young adults I didn't know that. Can you point me to the source of these num
198.
▲
by
goto11
4y ago
You can dance to pure rhythm, without melody. You can't dance to a melody without any rhythm. If follows that rhythm is more fundamental to music than melody, even though you usually need both.
199.
▲
by
goto11
4y ago
He is not saying a "10x" language couldn't be invented, he is saying a hypothetical 10x language wouldn't increase overall developer productivity 10x. His argument is developers use a lot of time on the intrinsic comple
200.
▲
by
goto11
4y ago
Sure, if you ignore things which happen now in music but didn't use to happen. For example the article mention more different keys are used today.
201.
▲
by
goto11
4y ago
> today's music has been dumbed down in comparison. People have been saying that as long as popular music have existed. Jazz was considered dumb and unsophisticated, crooners were considered dumb and unsophisticated, rock music was
202.
▲
by
goto11
4y ago
To summarize, "No silver bullet" claims no single innovation will increase software developer productivity tenfold across the board. He does not say an innovation can't increase productivity greatly in a specific area, neit
203.
▲
by
goto11
4y ago
This is still HTML though. Can't you serve plain unicode using the text/plain content type?
204.
▲
by
goto11
4y ago
The Legoland theme parks are not even owned by Lego anymore. Edit: Apparently I was wrong. Lego sold the themeparks during a downturn 20 years ago, but actually bought them back a few years ago, and now consider them a strategic part of the
205.
▲
by
goto11
4y ago
It is much harder to rewrite an existing product since you have to retain compatibility. If the old version of the app was crap then presumably the persistent data structures are also crap, but you can't discard them. So you end up bui
206.
▲
by
goto11
4y ago
> And I still don’t know what the Sampo is! You are not alone! Scholars are still debating it. It is some kind of magical device which create wealth, but there is a number of very different theories raging from a magical mill to the &quo
207.
▲
by
goto11
4y ago
Kalevala is a weird and amazing work. It is somewhat disjoint since it is assembled from various oral traditional and made into a single "epic" narrative by Elias Lönnrot. Scholars are still arguing about how much of the writing i
208.
▲
by
goto11
4y ago
Apple actually tried to rewrite the classic OS from scratch with the Copland project and it failed (at enormous cost). OS X was not a rewrite-from-scratch since they acquired an already working OS from Next. The had to add compatibility lay
209.
▲
by
goto11
4y ago
It is unclear what your complaint is. As the second quote states, you only need a sample size of one to prove that a certain ability can exist. You just cant say much about how widespread the ability is.
210.
▲
by
goto11
4y ago
The difference is not between tags and attributes, the difference is between text and markup. A markup language is human-readable text with added markup. A plain text file is basically a valid HTML file (I believe <title> is the only
More ›