HackerTrans
トップ新着トレンドコメント過去質問紹介求人

superamadeus

no profile record

コメント

superamadeus
·2 年前·議論
Most likely for Docker/container users using Alpine Linux or similar.
superamadeus
·2 年前·議論
This is really neat, thank you for sharing!
superamadeus
·2 年前·議論
I had the same initial reaction, but it turns out that if you have at least one private member, even with the same signature, it works as the parent comment suggests.

For example, these two classes are distinct to TypeScript:

    class Name {
        constructor(private value: string) {}

        getValue() {
            return this.value;
        }
    }

    class Email {
        constructor(private value: string) {}

        getValue() {
            return this.value;
        }
    }

    const email: Email = new Name(“Tim”); // Error: (paraphrasing) conflicting private declaration of “value”.
superamadeus
·2 年前·議論
Oh, fantastic. Thank you!
superamadeus
·2 年前·議論
Is there any discussion or in-depth explanation of the syntax choices? I understand that a goal was context free unambiguous parsing. But there are some things that surprise me.

For example, string interpolation:

    "Hello, (msg)$!\n"
Why “(msg)$” and not “$(msg)”? Surely the latter is easier to parse?