Hacker Newsnew | past | comments | ask | show | jobs | submit | mrsmrtss's commentslogin

So giving a gun to someone mentally challanged is not dangerous for you too?

were those goalposts heavy or did you use a machine to move them ?

C'mon, this is a bs "research".

Fore example, is this Java (65.72% dryness)

    if (condition){
      Blah();
    }
really more dense than this C# (58.4% dryness)?

    if (condition)
    {
      Blah();
    }
Now, does this Clojure 77.91 dryness) really beats them both to that margin?

   (if (condition) 
      (blah)))
This metric measures formatting more than anything else. I don't even go to other more nuanced details.

Good point. They should treat stand-alone braces and parens as empty lines and rerun the analysis. I'd like to see the results.

But still.. are 41.6% the lines of C# code stand-alone braces?


Probably not, but it’d be closer to Clojure. Depending on codebase you’ll likely have also many repeating namespace imports (can be avoided whith implicit usings in modern C#) etc.

Here's a better gauge for code density:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

How source-code size is measured

We start with the source-code markup you can see, remove comments, remove duplicate whitespace characters, and then apply minimum GZip compression. The measurement is the size in bytes of that GZip compressed source-code file.

Thanks to Brian Hurt for the idea of using size of compressed source-code instead of lines of code.

  median
  February 2025
  ===============
  Toit        558
  Perl        570
  Lua         580
  PHP         581
  Ruby        583
  Python 3    585
  Julia       634
  Chapel      646
  Racket      696
  JavaScript  698
  OCaml       741
  Erlang      798
  Go          831
  Dart        847
  Smalltalk   871
  Haskell     892
  Java        910
  Lisp        938
  Swift       939
  F#          943
  Pascal      959
  Fortran    1091
  C#         1117
  C          1121
  C++        1129
  Rust       1235
  Ada        1825

The Benchmarks Game has some highly optimized implementations and is not a good representation of typical code. Some languages allow you to go a lot lower than others if needed, which adds verbosity, that does not mean typical code must be verbose. There are things possible in C# that you just can't do in Java, for example. That does not mean typical Java code is more concise than C#. On the contrary, typical C# would be probably considerably more "dense".

Good points.

There is a trade-off.

Outside hotspots, readability / maintainability should take precedence.


I dislike the short windows for editing / deletion.

I could have just agreed and left it at that.


I'd expect programming style to have a lot to do with it. Many modern languages are evolving toward Lisp and support ever more of its features. Generic programming and meta programming for instance.

(I think the tool used accounts for imports and defines.)


A section of SICP that doesn't get enough attention imo:

2.5 Systems with Generic Operations

https://sarabander.github.io/sicp/html/2_002e5.xhtml


What anecdotal experience? Not that I think LLMs produce good code, but for me it has produced a lot better c# than TypeScript fo example. I guess quality matters more than quantity when it comes to LLMs training data.


I don't know why this is downvoted, because the statement is not wrong (https://benchmarksgame-team.pages.debian.net/benchmarksgame/...). Times have changed, modern .NET is very fast and is getting faster still (https://devblogs.microsoft.com/dotnet/performance-improvemen...).


I have nearly a decade of experience building .NET C# solutions on Linux and lately also on Mac, with almost everything hosted on Linux via Docker. I’m not sure what’s still missing for it to be accepted into the "first class citizen" club by the Linux elite.


The goal post must be moved. I constantly hear “there is no GUI story”… well thats not a core part of the language!


There actually is a great GUI story also for Linux today enabled by the excellent Avalonia (https://avaloniaui.net).


I have worked with AWS, Google and Azure. Google Cloud has the worst UI of them, it slow, broken and just horrible. UI in AWS may be faster than Azure, but overal layout and organization feels a lot better in Azure. I would strongly recommend clearly separating builds from deployments, if you don't want bad surprises. In the age of containers there should really be no difference in how, where or what you deploy.


Why would C# be the worst choice? Do you gave any real arguments or is it just your biased opinion.


Sorry, made a typo with 'gave' -> 'have'. But the point stays , why would C# be (one of) the worst choices here (when C# has small AOT binaries, hot reload etc)?


Nowadays C# has good AOT support, but it wasn't when Flutter was in its infancy.


> when C# has small AOT binaries, hot reload etc

In 2015?


>Most games today are "made" in C#, which is also a language with GC and Go beats it in every aspect in performance.

That is just nonsense. Go may beat C# in memory consumption, but even that is a close call if you use AOT. C# is arguably the fastest GC based language there is: https://benchmarksgame-team.pages.debian.net/benchmarksgame/... This was already so before .NET10, which brought many more optimizations: https://devblogs.microsoft.com/dotnet/performance-improvemen...


Regarding GC pauses, there is an interesting alternative GC with ultra low pauses for .NET called Satori. It's primarly discussed here https://github.com/dotnet/runtime/discussions/115627, and the GC itself can be found here https://github.com/VSadov/Satori


And Linux kernel is written in C etc, so by this logic you don't even need memory safety. There is no good excuse for designing a language in modern times (this century) with every object nullable by default. C# at least mostly has solved this design mistake later by introducing nullable reference types (https://learn.microsoft.com/en-us/dotnet/csharp/nullable-ref...). Then again, Go designers insisted that generics were also unnecessary, until they changed their mind.


On the contrary, because there we have 40 years of security exploits to prove otherwise, and Linux kernel has plenty of CVEs.

C# solution doesn't work, most projects never adopted it, because it is a mess to use with third party libraries that never bothered to add the required annotations, hence why it is still a warning and optional to this day.


I’m not sure which .NET libraries you are referring to, but all the ones we use have nullable reference types enabled. If you configure warnings as errors (as you should), then it works exceptionally well. Even if you were to use a library where nullable reference types are not enabled, you only need to check for null once during the library call, rather than everywhere in your codebase.


What? NRTs are used everywhere with WarningAsErrors:nullable also gaining popularity. Whatever environment you are dealing with C# in, if it’s the opposite I suggest getting away from that ASAP.


sidenote: just a heads up that I tried emailing you recently to let you know that you might want to contact the HN mods to find out why all your comments get set to dead/hidden automatically.

Your account might have triggered some flag sometime back and relies on users vouching for your comments so they can become visible again.



ah thank you for the context


I saw the email, and thanks. This is okay - I did not exercise (nor anyone should) good impulse control when dealing with bad faith arguments, which inevitably led to an account ban. Either way, Merry Christas!


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

Search: