Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
spion
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
80 ms
·
901.
▲
by
spion
10y ago
You're incorrect in assuming that I've only/first learnt JS. But its sort of a trend for people to look down on JS programmers, since its considered a "low-status" language ;) And I'm well aware that the direct
902.
▲
by
spion
10y ago
Interesting, I've found the reverse is true for me with ES6. For example, ES6 already had local functions (and a very terse form of that too using lambdas) class C { method() { let localFunction = x => x + 1 func
903.
▲
by
spion
10y ago
Also, 2000 called, they want their static types arguments back. Take a look at modern type systems, especially those that are tailored for dynamic languages (TypeScript, core.typed). They've grown in expressive power and type inference
904.
▲
by
spion
10y ago
> Given that you have untested code, you have a higher likelihood of bugs. Period. In statically typed languages too. In dynamic languages those bugs are likely to manifest a bit differently. Yay? Yes, test proponents love to say "y
905.
▲
by
spion
10y ago
This is a claim I hear often. I don't think its true. Its possible to have integration tests for every user story, yet still not cover even a fraction of the possible code paths due to an explosion of different possible outcomes and in
906.
▲
Tools for Radicals
(hackernoon.com)
2 points
by
spion
10y ago
|
0 comments
907.
▲
by
spion
10y ago
Yes, what is wrong is our understanding of the problem domain. Or even the stakeholder's real understanding of the problem domain :) Maybe we should stop working on types and focus on easy, high quality languages and tools which will
908.
▲
by
spion
10y ago
Yeah, unfortunately. For something like that, code generation of at least the initial record types would be required for different schemas at before-compile-time. Then they can be transformed further by the type level language. Another opti
909.
▲
by
spion
10y ago
Its not like its impossible to model metaprogramming with types. TypeScript recently brought a new level of expressiveness and power into the mainstream with mapped types. Example: https://goo.gl/LphqrJ Its possible to map
910.
▲
by
spion
10y ago
What ends up happening in practice instead is that large projects using dynamic languages are hesitant to change anything like that. So if you didn't know the problem domain sufficiently to guess all the interfaces up front correctly,
911.
▲
by
spion
10y ago
You should look at modern structural type systems that support generics. They have none of the flaws you're describing here. TypeScript is one such example. For example if you define a TypeScript interface interface Serializable {
912.
▲
by
spion
10y ago
I realised this was wrong to say, but unable to delete this message. Hope owning up to it is just as good.
913.
▲
by
spion
10y ago
I think Promises cover the first two nicely; they are an abstraction that gets you back exceptions. Also interestingly enough, one that would be impossible to write in Go. Not sure what you mean by "no concurrency". Perhaps you me
914.
▲
by
spion
10y ago
Yeah. I wonder if JavaScript is the only language where you can tell a non-user from a mile away...
915.
▲
by
spion
10y ago
The outer join example is not what I'd want LINQ to do. Most of the time it would be preferable to send two queries, one to retreive customers, the other to retreive high value purchases, then do the "joining" locally. Otherw
916.
▲
by
spion
10y ago
There is one, and its called MobX: https://mobx.js.org/getting-started.html
917.
▲
by
spion
10y ago
Yeah, the main problem with React is that you actually want React+MobX, not React+Flux :)
918.
▲
by
spion
10y ago
Its actually worse now, since they decided to call all versions of angular "just Angular". I'm not sure what the reasoning is behind this.
919.
▲
by
spion
10y ago
I agree with everything you say, except the "shocking cost" part. Its all a matter of perspective. You would have to write the transpiler anyway, since on a larger team if you're working with a designer, you would probably ge
920.
▲
by
spion
10y ago
The important part is that it lets you move, even if at much slower speeds. The small nature and unambiguity of the first step allows the possibility for it to beat procrastination impulses with lower willpower. Slow movement is better than
921.
▲
by
spion
10y ago
Another alternative (still requires willpower, but significantly less) is to ask yourself "What is the smallest step I can take in the direction of finishing the task" repeatedly. It looks simple, but the answer to that question i
922.
▲
by
spion
10y ago
Yes, things are moving forward, even if slowly :)
923.
▲
by
spion
10y ago
We usually take all software design principles at a face value and rarely think about the reasons why we have them in the first place. The reason why we need software design principles is because software changes. Software design principles
924.
▲
by
spion
10y ago
Thats not a strength of Go. Structural interfaces, channels and performant M:N green threads are its main strengths, and AFAIK there is no other language that provides a similar combination in a familiar C/ALGOL-like packaging. If such
925.
▲
by
spion
10y ago
Here is a complex dependency graphs built with no nesting and no "special" methods, only a combination of `then` and `all` function test(name1, name2) { let user1 = User.find(name1) let user2 = User.find(name2) let
926.
▲
by
spion
10y ago
No, old style callbacks don't empty the stack on thrown errors - they crash. Long stack traces are fine, but post-mortem debugging means analyzing the entire program's core dump. That includes everything that was in the heap at
927.
▲
by
spion
10y ago
Because the standard library doesn't really have that many callback based functions. The more important issue here is that Promises are seen as fundamentally incompatible with post-mortem debugging due to their empty-the-stack requirem
928.
▲
by
spion
10y ago
VSCode does have basic refactoring features.
929.
▲
by
spion
10y ago
Here is a wild theory: Maybe it would be better if the US got more closed down regarding immigration and engaged in protectionism - better for everyone that is. It would make it harder for US businesses to take advantage of cheap overseas
930.
▲
by
spion
10y ago
CS really botched variable scope IMO, and the whitespace rules made it a bit of an error-prone word-soup language. The rest was pretty great.
More ›