Hacker News new | ask | show | jobs
by matthewking 3464 days ago
The confusion in your example was using OOP vs functional. The Area getter in my example could be a method, it just makes it slightly nicer to have it as a getter in C# for that type of thing.

But, the actual getter/setter is:

  public Size { get; set; }
In Ruby it would be:

  attr_accessor :size
In scala it would be:

  var size
A little more code in c# but still a fairly concise 1 liner. Which you can't say the same for in Java, unless you use Lombok of course.

But yes, overall I agree, LOC is a bad metric but we don't have much else to go on. Pure project count perhaps is a more reliable metric of language use but still has many flaws.