Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
Metasyntactic
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
Metasyntactic
4mo ago
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#).
2.
▲
by
Metasyntactic
4mo ago
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 `[NonBoxedUnion(SomeI
3.
▲
by
Metasyntactic
4mo ago
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 cas
4.
▲
by
Metasyntactic
4mo ago
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. And
5.
▲
by
Metasyntactic
4mo ago
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 non-boxing approaches
6.
▲
by
Metasyntactic
5mo ago
> Would something like `List<int> = new(capacity: 10)[1, 2, 3]` have been possible? Great question. And our design docs, and discussion with the community cover this. The reason that was eliminated as an option (we considered sev
7.
▲
by
Metasyntactic
5mo ago
There isn't any such pressure. These features only happen because someone goes out of their normal job space to push for the necessity for them. All of the design team have full time work on other things. The design and impl only
8.
▲
by
Metasyntactic
5mo ago
> 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 simply say you w
9.
▲
by
Metasyntactic
5mo ago
How do you define "objectively illogical" here?
10.
▲
by
Metasyntactic
5mo ago
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 ta
11.
▲
by
Metasyntactic
5mo ago
> I guess I overdramatized the situation a bit :) It's a passionate topic for me; as somebody who has been using C# at work for 10 years now, I'm just not happy with the direction the language has been taking. You should come e
12.
▲
by
Metasyntactic
5mo ago
Hi there. Designer of this feature :D > is non-intuitive and unnecessary. intuitive is definitely in the eye of the beholder. When people saw: `HashSet<string> people = [with(StringComparer.CaseInsensitiveComparer), .. group1, gr
13.
▲
by
Metasyntactic
5mo ago
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 a
14.
▲
by
Metasyntactic
5mo ago
Hi there! One of the C# language designers here, working on unions. And the author of that feature :D So I'm happy to discuss the thinking here. It's not about saving keystrokes. It's about our decision that users shouldn
15.
▲
by
Metasyntactic
5mo ago
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. It's
16.
▲
by
Metasyntactic
5mo ago
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 implementing the simple,
17.
▲
by
Metasyntactic
5mo ago
Hi there! One of the C# language designers here, working on unions. We're interesting in both forms! We decided to go with this first as felt there was the most value here, and we could build the named form on top of this. In no wa
18.
▲
by
Metasyntactic
8mo ago
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 pri
19.
▲
by
Metasyntactic
8mo ago
> I'm curious how you can make such statements involving absolute time values, without specifying what the minimum hardware requirements are. That's a very fair point. In this case. I'm using the minimum requirements for v
20.
▲
by
Metasyntactic
8mo ago
> Hmm, the strong reason could be latency and layout stability. Tree-sitter parses on the main thread (or a close worker) typically in sub-ms timeframes One of the designers/architects of 'Roslyn' here, the semantic analys
21.
▲
by
Metasyntactic
8mo ago
C# Language Designer here, and one of the designers/architects of 'Roslyn', the semantic analysis engine that powers the C#/VB compilers, VS IDE experiences, and our LSP server. The original post conflates some concepts
22.
▲
by
Metasyntactic
1y ago
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 in a regular
23.
▲
by
Metasyntactic
1y ago
Hi there! Lang designer here. > More concise? Yes. Note: being more concise is not really the goal of the `?` features. The goal is actually to be more correct and clear. A core problem these features help avoid is the unfortunate sit
24.
▲
by
Metasyntactic
1y ago
Hi there, one of the lang designers here :) Think of it this way. We already supported these semantics in existing syntax through things like invocations (which are freely allowed to mutate/write). So `x?.SetSomething(e1)`. We want
25.
▲
by
Metasyntactic
1y ago
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 a final full soluti
26.
▲
by
Metasyntactic
1y ago
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 :)
27.
▲
by
Metasyntactic
1y ago
Hi there. C# lang designer here :) Discriminated unions continue to be worked on, and you can see our latest designs here: https://github.com/dotnet/csharplang/blob/main/proposals/uni... The space t
28.
▲
by
Metasyntactic
1y ago
Hi there! One of the lang designers here. That's been part and parcel for C# for over 10 years at this point. When we added `?.` originally, it was its nature that it would not execute code that was now unnecessary due to the receive
29.
▲
by
Metasyntactic
1y ago
> Cute, but is this actually needed? It's one more thing to remember, one more thing to know the subtleties of, and for what? Hi there! C# language designer here :-) In this case, it's more that this feature made the language
30.
▲
by
Metasyntactic
1y ago
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 all
More ›