Remix.run Logo
bartwe 3 hours ago

As a big user and fan of c# but this is a miss, as it always boxes value types.

hahn-kev an hour ago | parent | next [-]

It always boxes them TODAY. Lately the team has been releasing an MVP and improving stuff (like perf) later on. I wouldn't be surprised if they do the same thing here, as noted in the article you can already work around that yourself.

algorithmsRcool an hour ago | parent [-]

But why not do it right the first time. This is an obvious performance pitfall for people that want to adopt this feature. It is bizarre to me after the last decade has been dedicated to performance improvments.

hahn-kev an hour ago | parent [-]

They do this often actually. They will likely watch how people use it and tailor the design to fix that.

As for performance, in lots of use cases it's not going to be a big deal. If you are super sensitive to performance issues then you can just wait, meanwhile everyone else gets to use the new feature. You have to start somewhere and waiting to satisfy everything usually ends up with doing nothing

zamalek 3 hours ago | parent | prev | next [-]

When I cared about C# (which is no longer the case), I was lightly involved in the discussion for this and sibling features - mostly theorycrafting exactly your ask: the JIT team very succinctly expressed extreme disinterest in adding support of any kind.

The C# compiler could do it to a degree, but there would be too many caveats to make it actually useful. Unless the JIT team has a change of heart, you're probably never going to see this.

za3faran 2 hours ago | parent [-]

What do you use these days language-wise?

Izikiel43 3 hours ago | parent | prev [-]

There is the non boxing option, and this is the first iteration of the work, it's not one and done.