Yes. We do. And unions should work well in F#. It's designed to be a very easy pattern for all CLR languages and compilers to understand (including F#).
Hi there! One of the C# lang designers here. I discuss that here: https://news.ycombinator.com/item?id=48255658 Note that my expectation would be that the non-boxed form would be as trivial as adding…
Hi there. One of the C# lang designers here. You're correct. The unions we're working on right now are 'type unions'. So the type is inherent in the union distinction, and you would not be able to distinguish that case.…
Hi there, one of the C# lang designers here. I discuss this a bit in https://news.ycombinator.com/item?id=48255658. Contrary to what a lot of people guess, boxing is actually a really good strategy most of the time.…
Hi there! C# language designer here, and one of the people working on unions. Boxing is not something inherently to be avoided. It actually can work better in many (most?) use cases, and avoids a lot of problems that…
> Having to opt-in like the current preview shows it looks like a PITA that I'd quickly become tired of. My belief is that we will have a `union struct` just like we have `record` and `record struct`. Where you can…
How do you define "objectively illogical" here?
Sure, as an example: https://github.com/dotnet/csharplang/blob/main/meetings/work... Again, very rough. We go round and round on things. Loving to decompose, debate and determine how we want to tackle all these large…
Hi there! One of the C# language designers here, working on unions. We're very interesting in this space. And we're referring to it as, unsurprisingly, 'anonymous unions' (since the ones we're delivering in C#15 are…
Hi there! One of the C# language designers here, working on unions. We're extremely interested in discriminated unions. A real problem is that there so much interest, with many varying proposals on how best to do them.…
Hi there! One of the C# language designers here, working on unions. All the different options have tradeoffs. As an example, the non-boxing options tear, which can be problematic. And, we have a lot of experience…
I wrote several of typescript's initial compilers. We didn't use red/green for a few reasons: • The js engines of the time were not efficient with that design. This was primarily testing v8 and chakra (IE/edge's prior…
Sure. But that was the case prior to this feature as well. Previously you'd have to store the variable somewhere and null check it. Those could all lead to different outcomes. This just encapsulates that pattern safely…
Hard problems take time :) They also often need a lot of scaffolding to be built along the way. We like breaking hard problems into much smaller, composable, units that we can build into the language and then compose to…
Thanks @klysm! I think we're getting close to that. `unions` are a big part of this discussion, and we're working very hard to hopefully get them in soon :)
Just a minor correction (as I'm the author of c#'s raw string literal feature). The indentation of the final ` """` line is what is removed from all other lines. Not the indentation of the first line. This allows the…
Hi there! I'm a developer on the .Net team, and I heavily work on our IDE offerings. You can absolutely write a small program that is only a CLI, and our tooling is heavily tailored to make that a great experience.…
Hi there. I'm the language designer who created the 'Collection Expression' design/specification: https://github.com/dotnet/csharplang/issues/5354 You can see the entire history of the proposal there. To answer you…
Hi there, C# Lang Designer here. :) We're always thinking about the bloat concern when it comes to language development. However, our philosophy on it is that bloat primarily comes when you add replacement systems that…
> (What happens if the closing quotes pass some of the text?) That's an error. Called out here: https://github.com/dotnet/csharplang/blob/main/proposals/raw...
> I just really dislike reasoning about trimming the leading whitespace Note: this feature is entirely optional. You can absolutely not have leading whitespace trimming at all. Indeed, this is a requirement of the…
Hi, I'm one of teh C# language designers, and I work on the compiler implementation as well. C# has never had a "simple tokenizer". Indeed, even the first language has complex lexical constructs that are part and parcel…
Hi there! I'm the lang designer and i wrote up that spec. Could you clarify what you didn't understand about the indentation examples? I can work on clarifying them. Thanks!
Hi there! I'm one of the C# language designers. I'm working on a proposal for that right now: https://github.com/dotnet/csharplang/issues/5354 Thanks!
Hi there, I'm the lang designer and implementor here. That would violate a core goal of the feature which is that the content itself doesn't need escaping. This sort of approach would require all users to have tooling…
Yes. We do. And unions should work well in F#. It's designed to be a very easy pattern for all CLR languages and compilers to understand (including F#).
Hi there! One of the C# lang designers here. I discuss that here: https://news.ycombinator.com/item?id=48255658 Note that my expectation would be that the non-boxed form would be as trivial as adding…
Hi there. One of the C# lang designers here. You're correct. The unions we're working on right now are 'type unions'. So the type is inherent in the union distinction, and you would not be able to distinguish that case.…
Hi there, one of the C# lang designers here. I discuss this a bit in https://news.ycombinator.com/item?id=48255658. Contrary to what a lot of people guess, boxing is actually a really good strategy most of the time.…
Hi there! C# language designer here, and one of the people working on unions. Boxing is not something inherently to be avoided. It actually can work better in many (most?) use cases, and avoids a lot of problems that…
> Having to opt-in like the current preview shows it looks like a PITA that I'd quickly become tired of. My belief is that we will have a `union struct` just like we have `record` and `record struct`. Where you can…
How do you define "objectively illogical" here?
Sure, as an example: https://github.com/dotnet/csharplang/blob/main/meetings/work... Again, very rough. We go round and round on things. Loving to decompose, debate and determine how we want to tackle all these large…
Hi there! One of the C# language designers here, working on unions. We're very interesting in this space. And we're referring to it as, unsurprisingly, 'anonymous unions' (since the ones we're delivering in C#15 are…
Hi there! One of the C# language designers here, working on unions. We're extremely interested in discriminated unions. A real problem is that there so much interest, with many varying proposals on how best to do them.…
Hi there! One of the C# language designers here, working on unions. All the different options have tradeoffs. As an example, the non-boxing options tear, which can be problematic. And, we have a lot of experience…
I wrote several of typescript's initial compilers. We didn't use red/green for a few reasons: • The js engines of the time were not efficient with that design. This was primarily testing v8 and chakra (IE/edge's prior…
Sure. But that was the case prior to this feature as well. Previously you'd have to store the variable somewhere and null check it. Those could all lead to different outcomes. This just encapsulates that pattern safely…
Hard problems take time :) They also often need a lot of scaffolding to be built along the way. We like breaking hard problems into much smaller, composable, units that we can build into the language and then compose to…
Thanks @klysm! I think we're getting close to that. `unions` are a big part of this discussion, and we're working very hard to hopefully get them in soon :)
Just a minor correction (as I'm the author of c#'s raw string literal feature). The indentation of the final ` """` line is what is removed from all other lines. Not the indentation of the first line. This allows the…
Hi there! I'm a developer on the .Net team, and I heavily work on our IDE offerings. You can absolutely write a small program that is only a CLI, and our tooling is heavily tailored to make that a great experience.…
Hi there. I'm the language designer who created the 'Collection Expression' design/specification: https://github.com/dotnet/csharplang/issues/5354 You can see the entire history of the proposal there. To answer you…
Hi there, C# Lang Designer here. :) We're always thinking about the bloat concern when it comes to language development. However, our philosophy on it is that bloat primarily comes when you add replacement systems that…
> (What happens if the closing quotes pass some of the text?) That's an error. Called out here: https://github.com/dotnet/csharplang/blob/main/proposals/raw...
> I just really dislike reasoning about trimming the leading whitespace Note: this feature is entirely optional. You can absolutely not have leading whitespace trimming at all. Indeed, this is a requirement of the…
Hi, I'm one of teh C# language designers, and I work on the compiler implementation as well. C# has never had a "simple tokenizer". Indeed, even the first language has complex lexical constructs that are part and parcel…
Hi there! I'm the lang designer and i wrote up that spec. Could you clarify what you didn't understand about the indentation examples? I can work on clarifying them. Thanks!
Hi there! I'm one of the C# language designers. I'm working on a proposal for that right now: https://github.com/dotnet/csharplang/issues/5354 Thanks!
Hi there, I'm the lang designer and implementor here. That would violate a core goal of the feature which is that the content itself doesn't need escaping. This sort of approach would require all users to have tooling…