News for hackers. Stuff that matters.
Re:HTTP/3 is everywhere but nowhere by xpressvideoz on Monday March 17, 2025 @10:12AM (#43388829)
> side note: sad that .NET and C# are not considered "major"...

Even Microsoft does not use C# for their new projects. See the new TypeScript compiler that is being rewritten in Go. So I think it is safe to say C# is indeed a minor language.

Re:HTTP/3 is everywhere but nowhere by CharlieDigital on Monday March 17, 2025 @10:14AM (#43388846)

    > So I think it is safe to say C# is indeed a minor language
That's not really the case; StackOverflow survey[0] shows C# (27.1%) right behind Java (30.3%) and well ahead of Go (13.5%), Rust (12.6%), Kotlin (9.4%), Ruby (5.2%), and Scala (2.6%). If we exclude HTML/CSS, Bash/Shell, and SQL, C# would be #5 in actual languages used over the past year by devs in this survey.

You get the same result from scraping job postings: https://www.devjobsscanner.com/blog/top-8-most-demanded-prog...

    1. JS/TS (note these two are collapsed)
    2. Python
    3. Java
    4. C#
Two completely separate sources with the same output...

    > See the new TypeScript compiler that is being rewritten in Go
If they had started from scratch, Anders mentioned the considerations would be different. But because they had an existing body of code that was not class based, it would be more of a re-write (C#) versus a refactor (Go). A lot of folks read the headline without actually reading Anders' comments and reasoning.

C# is good for many things -- in particular application backends, game engines (both Godot and Unity) -- and not optimal for other things -- like serverless functions. Each language has a place and Go and Python are certainly better for CLI tools, for example.

[0] https://survey.stackoverflow.co/2024/technology

Re:HTTP/3 is everywhere but nowhere by bheadmaster on Monday March 17, 2025 @10:53AM (#43389203)
> StackOverflow survey[0] shows C# (27.1%) right behind Java (30.3%)

Can we rule out sample bias here? After all, Jon Skeet [0] is an important part of the Stack Overflow's C# community.

It might just be the case that C# and Java developers use Stack Overflow more than users of other languages.

[0] https://toggl.com/blog/save-princess-8-programming-languages

Re:HTTP/3 is everywhere but nowhere by CharlieDigital on Monday March 17, 2025 @10:59AM (#43389267)
You get the same result from scraping job postings: https://www.devjobsscanner.com/blog/top-8-most-demanded-prog...

    1. JS/TS (note these two are collapsed)
    2. Python
    3. Java
    4. C#
So now you have two data points that align and are completely independent measuring two different things (one self reported, one based on employer job postings).

I'd say it's consistent and reliable?

It's not like people use StackOverflow because it's written in C#; people use StackOverflow because Google points us there.

Re:HTTP/3 is everywhere but nowhere by 0x457 on Monday March 17, 2025 @10:52AM (#43389187)
I never understood SO as a measurement tool for anything, but people that can't read docs.
Re:HTTP/3 is everywhere but nowhere by CharlieDigital on Monday March 17, 2025 @10:57AM (#43389244)
You have to have some metrics from somewhere to be able to understand which languages are being used.

SO is one data point, but there are certainly others.

Re:HTTP/3 is everywhere but nowhere by briandear on Monday March 17, 2025 @11:39AM (#43389678)
GitHub is probably a better source. SO is self selecting for people asking questions about something, not actually using it. A “harder” thing might have more SO questions, so it isn’t representative of actual usage.
Re:HTTP/3 is everywhere but nowhere by CharlieDigital on Monday March 17, 2025 @12:00PM (#43389911)
I posted above, but you can also see:

You get the same result from scraping job postings: https://www.devjobsscanner.com/blog/top-8-most-demanded-prog...

    1. JS/TS (note these two are collapsed)
    2. Python
    3. Java
    4. C#
Two datapoints, completely discrete, same result.
Re:HTTP/3 is everywhere but nowhere by 0x457 on Monday March 17, 2025 @06:35PM (#43393437)
It tells me which languages have people asking questions about them. That metric is useful only if it's normalized around how many people are using that language, but we don't have that metric.
Re:HTTP/3 is everywhere but nowhere by Teckla on Monday March 17, 2025 @10:53AM (#43389205)
But because they had an existing body of code that was not class based, it would be more of a re-write (C#) versus a refactor (Go).

I don't understand this reasoning at all, and I'm hoping you can shed some light on it.

As far as I know, C# supports static methods. Thus, using OO in C# would not have been required, would it?

I feel like I'm missing something here.

Re:HTTP/3 is everywhere but nowhere by Kipters on Monday March 17, 2025 @11:19AM (#43389495)
That wouldn't feel very idiomatic - you can do it but would feel wrong
Re:HTTP/3 is everywhere but nowhere by int_19h on Monday March 17, 2025 @11:30PM (#43395492)
C# supports top-level functions as well, that's not the issue. But, just to give a simple example, in TS you can do things like:

   var foo: { bar: { baz: string } }
which have no equivalent in C#, because it doesn't have anonymous struct types, and its typing system is almost entirely nominal. Go, on the other hand, can translate this directly pretty much mechanically:

   var foo struct { bar struct { baz string } } 
And keep in mind that they aren't completely ditching the existing implementation, either, so for a while they're going to have to e.g. fix bugs in both side by side. It helps when the code can also be mapped almost 1:1.
Re:HTTP/3 is everywhere but nowhere by CharlieDigital on Tuesday March 18, 2025 @12:16AM (#43395703)
The interesting thing is that you can do this in C# with tuples because tuples can nest tuples.

    type Platform = "Mastodon" | "Bluesky" | "Threads";

    type Profile = {
      name: string,
      socials: {
        handle: string,
        platform: Platform
      }[]
    }

    function getProfiles() : Profile[] {
      return [{
        name: "Charles",
        socials: [
          { handle: "@chrlschn", platform: "Mastodon" },
          { handle: "@chrlschn", platform: "Bluesky" }
        ]
      },
      {
        name: "Sandra",
        socials: [
          { handle: "@sndrchn", platform: "Threads" }
        ]
      }]
    }
Versus:

    using Profile = (
      string Name,
      (
        string Handle,
        Platform Platform
      )[] Socials //  Array of tuples in another tuple
    );

    enum Platform { Mastodon, Bluesky, Threads }

    Profile[] GetProfiles() => new[] {
      ("Charles", new[] {
        ("@chrlschn", Platform.Mastodon),
        ("@chrlschn", Platform.Bluesky),
      }),
      ("Sandra", new[] {
        ("@sndrchn", Platform.Threads)
      }),
    };
With some caveats
Re:HTTP/3 is everywhere but nowhere by afiori on Wednesday March 19, 2025 @09:15AM (#43411506)
I would love if in mapping the typescript types to go they ended up building a "compiler plugin" to enhance go's type system.
Re:HTTP/3 is everywhere but nowhere by bheadmaster on Wednesday March 26, 2025 @05:43AM (#43480401)
TypeGo by Microsoft (TM).

Considering how fast the TypeScript compiler is, the TypeGo -> Go transpilation might as well be similar (up to a constant factor) in speed to Go compilation itself.

I'd give it a try. As a highly enthusiastic Go programmer, a powerful TypeScript-like type system is something I'd welcome in Go with open arms.

Re:HTTP/3 is everywhere but nowhere by briandear on Monday March 17, 2025 @11:38AM (#43389662)
I’ve never filled out a stack overflow survey. I wouldn’t say Stack Overflow is statistically representative what’s being used — it’s statistically representative of people that use Stack Overlow. 10 years ago SO was my go-to. Now, I barely notice it — it seems very outdated in many respects.
Re:HTTP/3 is everywhere but nowhere by kevinmershon on Monday March 17, 2025 @10:29AM (#43388985)
It's pretty true from recent experience. I've recently started rewriting a C# based desktop/window stream tool because of how weak the support is across the board for C#. Microsoft abandoned WinRTC, Sipsorcery is one guy and is missing VP9 HEVC and AV1 support. And for fancier stuff like using computer shaders for color space conversion, SharpDX is constantly referenced by chatgpt and MS docs, yet it's archived and unmaintained as well. I ended up using media streams VideoFrame class but it and two other classes required to interact with it have unpreventable thread and memory leaks built into the WinRT implementations themselves 4+ years ago. Good times.

All of the above was easy to implement in Rust

Re:HTTP/3 is everywhere but nowhere by jabart on Monday March 17, 2025 @11:18AM (#43389484)
The interviews with the Typescript dev doing the rewrite will tell you why. Switching their compiler to Go was a quick transition since Go matched their current JS build. The dev also wanted to use go, and use functional programming. It would have required more work to switch from functional to OOP style that C# has. Dev also didn't want to learn F#. Nothing about C#, just a personal decision with the least amount of work to get to a beta.
Re:HTTP/3 is everywhere but nowhere by int_19h on Monday March 17, 2025 @11:32PM (#43395500)
FWIW the "functional programming" angle here is misconstrued - C# has better facilities for it than Go.

The thing that they actually wanted is data-centric programming with structural types.

Re:HTTP/3 is everywhere but nowhere by jayd16 on Monday March 17, 2025 @11:19AM (#43389492)
Go folks are going to be holding up this Typescript decision for years, aren't they...
Re:HTTP/3 is everywhere but nowhere by kragen on Monday March 17, 2025 @10:33AM (#43389018)
This is an interesting point I hadn't thought of when I saw the announcement of the new TypeScript compiler. It might be overstating the case to say that C# is indeed a minor language, but it's thought-provoking that it wasn't Microsoft's automatic choice here, the way it is for some all-Microsoft in-house IT shops.
Re:HTTP/3 is everywhere but nowhere by CharlieDigital on Monday March 17, 2025 @11:19AM (#43389488)
Microsoft themselves ship on a variety of platforms.

It's more about right tool for the right job.

Good example is Azure CLI; it's Python. Microsoft is also a big contributor in the Python scene[0]

I don't think it's surprising at all that they didn't use C# to write a compiler for TS.

They have internal champions for Rust[1]

I'd say Microsoft is possibly one of the most diverse shops when it comes to tech selection.

[0] https://devblogs.microsoft.com/python/supporting-the-python-...

[1] https://www.theregister.com/2022/09/20/rust_microsoft_c/

Re:HTTP/3 is everywhere but nowhere by troupo on Monday March 17, 2025 @03:39PM (#43392021)
It's not thought-provoking if you care to spend 5 minutes and read/listen to the reasons they provided.
Re:HTTP/3 is everywhere but nowhere by kragen on Friday March 21, 2025 @10:21AM (#43436039)
I am not at all surprised to find that there are people in whom it does not provoke thought, but I am mildly amused that one of them would admit to it.
Re:HTTP/3 is everywhere but nowhere by int_19h on Monday March 17, 2025 @11:33PM (#43395508)
TypeScript guys have a FAQ and even a video explaining why they chose Go exactly, and why not C# (or Rust, or other things). They had their reasons.