Typescript is a good try, but ultimately our favourite JS runtime errors still happen, even with all the strictest ts settings. Syntactically it is quite clumsy, you can see the uninspired mix of C++ and Java in there. The typings now although people are doing lots of cute things with them, don't do some really fundamental things. For example there is currently no sensible way to type a non empty array in Typescript. Also the discriminated union with the identifying string literal in there is not terribly elegant.
Personally I wish either Rescript or Purescript gained adoption instead.
type NonEmptyArray = [unknown, ...unknown[]];
const nea: NonEmptyArray = [];
// ^^^ Type '[]' is not assignable to type 'NonEmptyArray'.
// Source has 0 element(s) but target requires 1.
Very tastefully done. Every one of these items is a huge improvement. This one in particular drives me crazy: `x.map(($) => $.name)`, `x.map .name` is almost Haskell level terseness.
Can this all not be done as experimental typescript though, rather than a new language?
Civet aims to be 99% compatible with existing TypeScript so it could be considered an experimental TypeScript. With any luck Civet catches on and does to TS what CoffeeScript did to ES and all the best features trickle into the standard eventually.
The difficult part for TS/JS is they can't easily opt into some of the more whitespace/context sensitive features without breaking changes to existing code or forcing people to opt in with a "jsNext" directive or something.
Oh I stand by that comment. It is my opinion, did it offend you? I'm curious why you even felt the need to comment. Not every Briton has the power to do what she did. So the article is essentially just about her. She told all her friends what she was doing beforehand. Now what type of behaviour would you describe this as?
Well I don't know here age but since she had a two year old child in 2017 according to the article, she's probably isn't retired yet. And she's apparently still writing for the Guardian, so definitely not retired.
> Deeply unhappy at the EU referendum result last June, Amelia Hill applied for dual nationality for her and her children – returning to the German roots that her grandparents fled from during the 1930s
Last paragraph:
> We are no longer prisoners of a country whose politicians do not and will not, likely for a generation or more, reflect me in any shape or form. We have options.
I guess having options is the same as returning to your roots.
Your anonymous comment reduces somebody’s experience and decisions to a single sentence. I’m afraid it completely fails to successfully summarise them.