Hacker News new | past | comments | ask | show | jobs | submit | throwaway09432's comments login

The production of this gadget will create more pollution.


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.


> there is currently no sensible way to type a non empty array in Typescript

If we remove the "sensible" requirement:

    type NonEmptyArray = [any, ...any[]]


Or better:

    type NonEmptyArray = [unknown, ...unknown[]];
    const nea: NonEmptyArray = [];
    //    ^^^ Type '[]' is not assignable to type 'NonEmptyArray'.
    //        Source has 0 element(s) but target requires 1.


Can you map over this and preserve the NonEmptyArray type?


Do you mean pass in a type?

    type NonEmptyArray<T> = [T, ...T[]];


I mean if I have a NonEmptyArray say xs, and I then xs.map(x=>2*x), will the result of this expression be a NonEmptyArray ?


No, unfortunately it will just be number[] as the return type.


Does carbon filter this stuff?


Personally I prefer haml, in my opinion JSX is grotesque.


Honestly, all I care about is speed. Couple of word swaps here and there using a thesaurus, who gives a shit.


It works!


Python lambda syntax is ugly as hell.


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.


As pointed out below, she still lives in London after all this verbiage.

https://twitter.com/intent/user?screen_name=byameliahill

Edit - Censored [flagged] because we are apparently not allowed to criticise. Pathetic.


She didn’t move to Germany, but her kids have EU passports now and for as long as that’s a thing. Mine don’t and I do sometimes feel sad about that.


She never claimed to have moved to Germany. Or to plan it. She wants the option open, especially for her children.


Reading it back you are indeed correct. I found the article misleading.


Ha, cute, a snippy comment from a throwaway who admits it when s/he gets it wrong.

Could it be that your presumptions about the author ("attention-seeking") is what misled you?


>"attention seeking"

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?


Though she writes: "I find myself imaging what it would be like if my husband and I retire to Germany."


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.


Intro paragraph:

> 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.


So basically after all that, you are quitting an in-office role for a remote role.


After all what? A blog post?

Your anonymous comment reduces somebody’s experience and decisions to a single sentence. I’m afraid it completely fails to successfully summarise them.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: