Skip to content

Conversation

stephentoub
Copy link
Member

No description provided.

@ghost ghost assigned stephentoub Apr 8, 2022
@ghost ghost added the area-Meta label Apr 8, 2022
@ghost
Copy link

ghost commented Apr 8, 2022

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: stephentoub
Assignees: stephentoub
Labels:

area-Meta

Milestone: -

@stephentoub stephentoub force-pushed the useu8 branch 2 times, most recently from ab7b246 to 41d58ba Compare April 8, 2022 04:34
@teo-tsirpanis
Copy link
Contributor

@stephentoub
Copy link
Member Author

Thank you for pointing out the omission. I can add it here, and also search for anything else like this I may have missed. I didn't pay attention to byte[]s being filled with seemingly arbitrary numbers, as opposed to (byte)'char'.

@marek-safar
Copy link
Contributor

I'm surprised there is nothing in CoreLib.

@stephentoub
Copy link
Member Author

I'm surprised there is nothing in CoreLib

Do you know of any there? This was search/replace based on specific patterns. I'm sure there are others with more complicated patterns.

@teo-tsirpanis
Copy link
Contributor

image

@stephentoub
Copy link
Member Author

Most of those aren't strings, e. g. the first ones are number of days in each month. We shouldn't use u8 to encode arbitrary data.

@teo-tsirpanis
Copy link
Contributor

I didn't say to make them u8, I pointed out that there isn't anything missed in Corelib.

@stephentoub
Copy link
Member Author

I didn't say to make them u8, I pointed out that there isn't anything missed in Corelib.

Ah, thanks :-)

@marek-safar
Copy link
Contributor

marek-safar commented Apr 8, 2022

Perhaps I misunderstood the feature as I was thinking that it could help with strings like

internal static string[] fixedNumberFormats = new string[] {
or
private static readonly string[] s_negCurrencyFormats =

@stephentoub
Copy link
Member Author

Perhaps I misunderstood the feature as I was thinking that it could help with strings like

The feature is basically that you write "text"u8 and at C# compile-time the compiler produces the logical equivalent of new byte[] { (byte)'t', (byte)'e', (byte)'x', (byte)'t' }.

@stephentoub
Copy link
Member Author

I'm going to close this for now and will redo it once we have a compiler that adapts to recent design decisions around u8.

@ghost ghost locked as resolved and limited conversation to collaborators May 20, 2022
@stephentoub stephentoub deleted the useu8 branch June 29, 2023 14:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants