Comment

Comment by nopal

I'm sure it does, but I can write the same class in C# just as easily:

    class Person
    {
        public int Sanity { get; set; }
    
        public Person()
        {
            Sanity = 50;
        }
    }
And to call it:

    var programmer = new Person();
    programmer.Sanity += 1000000;
    Console.WriteLine(programmer.Sanity);
I don't see much difference between Person.new and new Person();.

What are the real ways in which it will knock my socks off? I'm honestly asking. Even though I program C# at work, I'm very interested in the advantages of other languages.

parent nopal 13 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton