Earlier quoted context omitted.
It’s a good design but I disagree that it improves on all the safety features. For starts the child proof safety shutters are still only optional in some regions. > except the polarity isn't fixed, that's its one theoretical disadvantage Polarity isn’t fixed on any mains sockets. That’s why the A in AC stands for “alternating”
And yet there is a big difference between the hot and neutral conductors in a 120V outlet in the US. The neutral remains close to ground potential, and is actually bonded to earth at the breaker panel.
Learn how to unleash the full potential of the type system of TypeScript
231–240 of 256 posts
Re: Learn how to unleash the full potential of the type system of TypeScript
#232Earlier quoted context omitted.
It’s a good design but I disagree that it improves on all the safety features. For starts the child proof safety shutters are still only optional in some regions. > except the polarity isn't fixed, that's its one theoretical disadvantage Polarity isn’t fixed on any mains sockets. That’s why the A in AC stands for “alternating”
And yet there is a big difference between the hot and neutral conductors in a 120V outlet in the US. The neutral remains close to ground potential, and is actually bonded to earth at the breaker panel.
However I always understood potential to be different to polarity. And that AC (which, to my knowledge, all electric grids globally carry) is the literal oscillation of polarity. What am I missing/misunderstanding from the GPs post?
Re: Learn how to unleash the full potential of the type system of TypeScript
#233Earlier quoted context omitted.
Yes, let's write everything in assembly language. Only the real pros will dare touch that! /s Complex to understand code does not entail high quality of maintainers. Quite the opposite in my experience.
That was not my point. Writing simple types with Typescript is simple, and improves any Javascript code. Writing complex types (inference, generics, inheritance) is really punishing. And people that don’t truly know what they’re doing won’t even try (or at least in my experience, I’ve never seen them try).
A big bulk of their compile time came from things that could've been checked in much more efficient (for the compiler) ways.
I would never urge anyone to not use statically typed languages, mind you, I think people just need to be a bit more pragmatic. Sometimes I find it unfortunate that TypeScript provides the facilities it does while still not having solved the basic ergonomics of types (more consistent inference, etc.). Having types that generate types creates problems that I honestly don't experience anywhere else and I would rather that people just not in general, but that's something you can fix with rules.
An ironic part of all of this is that Haskell's type system is a lot easier to use and use well than TypeScript's, in the end, which is especially funny considering all the talk of pragmatism.
Re: Learn how to unleash the full potential of the type system of TypeScript
#234> Over the years, the type system of TypeScript has grown from basic type annotations to a large and complex programming language. Give someone (particularly a developer) the opportunity to build something complicated and undoubtedly they will. So now you have two problems, the complicated program that actually does some hopefully useful work, and another complicated program on top of it that fills your head and slow…
Re: Learn how to unleash the full potential of the type system of TypeScript
#235Earlier quoted context omitted.
The thing with electrical plus is that they should be designed around safety first, rather than convenience. And the U.K. plug is a lot more safety focused than many other plug standards. The advantage of the U.K. plug is that live pins are physically blocked and only released when the Earth pin is present. This is why the Earth pin is slightly longer on U.K. plugs and why insulated devices have a plastic Earth pin r…
When I was a kid before we had legos we had some soviet alternative called constructor or something. Everything was made from metal, crews etc. obviously as a kid one of the first “hello world” things you will build is “plug” that you can insert into those holes in the wall. My older brother was lucky when he did it as the fuse in the house went off. My younger brother did the same about a decade later but holding in…
Re: Learn how to unleash the full potential of the type system of TypeScript
#236Earlier quoted context omitted.
When I was a kid before we had legos we had some soviet alternative called constructor or something. Everything was made from metal, crews etc. obviously as a kid one of the first “hello world” things you will build is “plug” that you can insert into those holes in the wall. My older brother was lucky when he did it as the fuse in the house went off. My younger brother did the same about a decade later but holding in…
Sounds like a more dangerous version of meccano
[0] https://www.amazon.pl/Konstructor-Oryginalny-zestaw-konstruk...
Re: Learn how to unleash the full potential of the type system of TypeScript
#237Earlier quoted context omitted.
> What are Unix man-pages but comments about the APIs they describe? Documentation. Obviously not the same thing as inline comments in the code. You can generate documentation using comments (i.e. jsdoc), but comments are the weakest form of guidance for other developers. Types don't replace documentation, but are part of the same goal: making code easier to consume. > When type-declarations become more complicated t…
> You can generate documentation using comments (i.e. jsdoc), So comments are a solution to something. Don't TypeScript programmers use them as well?
Re: Learn how to unleash the full potential of the type system of TypeScript
#238Earlier quoted context omitted.
When I was a kid before we had legos we had some soviet alternative called constructor or something. Everything was made from metal, crews etc. obviously as a kid one of the first “hello world” things you will build is “plug” that you can insert into those holes in the wall. My older brother was lucky when he did it as the fuse in the house went off. My younger brother did the same about a decade later but holding in…
Sounds like a more dangerous version of meccano
Re: Learn how to unleash the full potential of the type system of TypeScript
#239Earlier quoted context omitted.
And yet there is a big difference between the hot and neutral conductors in a 120V outlet in the US. The neutral remains close to ground potential, and is actually bonded to earth at the breaker panel.
I’ll admit that my understanding of these things is rather superficial. I might understand more than the average person but that’s not exactly a high bar to set. However I always understood potential to be different to polarity. And that AC (which, to my knowledge, all electric grids globally carry) is the literal oscillation of polarity. What am I missing/misunderstanding from the GPs post?
But that’s what I meant, the UK and US plugs (as well as switzerland I think?) theoretically have one pin always be hot, one always be neutral.
With Schuko, you can reverse the plug, and it'll still work, which is on the one hand awesome when you've got a tight space and want more plugs to fit, but can also require higher costs, as you've always got to switch both wires instead of just switching the hot one (although this is best practices everywhere, as you can never know how well the electrician followed specs when wiring your apartment 90 years ago).
Re: Learn how to unleash the full potential of the type system of TypeScript
#240Earlier quoted context omitted.
My coding philosophy is centered around simple interfaces. I think of power sockets and plugs. The simpler the socket/plug design, the easier it is to plug in. It's easier to connect a European plug which has 2 round pins than it is to connect a UK plug which has 3 rectangular pins at different angles. You can imagine how difficult it would be to connect a plug with 10 pins; it would be difficult to get the alignment…
The thing with electrical plus is that they should be designed around safety first, rather than convenience. And the U.K. plug is a lot more safety focused than many other plug standards. The advantage of the U.K. plug is that live pins are physically blocked and only released when the Earth pin is present. This is why the Earth pin is slightly longer on U.K. plugs and why insulated devices have a plastic Earth pin r…