HackerTrans
TopNewTrendsCommentsPastAskShowJobs

superamadeus

no profile record

comments

superamadeus
·2 tahun yang lalu·discuss
Most likely for Docker/container users using Alpine Linux or similar.
superamadeus
·2 tahun yang lalu·discuss
This is really neat, thank you for sharing!
superamadeus
·2 tahun yang lalu·discuss
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 tahun yang lalu·discuss
Oh, fantastic. Thank you!
superamadeus
·2 tahun yang lalu·discuss
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?