Click here to Skip to main content
15,907,687 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
trønderen15-Jan-24 12:37
trønderen15-Jan-24 12:37 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
jmaida15-Jan-24 13:13
jmaida15-Jan-24 13:13 
GeneralRe: Little things that irritate the heck out of me - #1 Pin
BernardIE531715-Jan-24 5:16
BernardIE531715-Jan-24 5:16 
General.NET growing pains Pin
honey the codewitch13-Jan-24 14:43
mvahoney the codewitch13-Jan-24 14:43 
GeneralRe: .NET growing pains Pin
Daniel Pfeffer13-Jan-24 21:20
professionalDaniel Pfeffer13-Jan-24 21:20 
GeneralRe: .NET growing pains Pin
honey the codewitch13-Jan-24 22:26
mvahoney the codewitch13-Jan-24 22:26 
GeneralRe: .NET growing pains Pin
Sander Rossel14-Jan-24 23:40
professionalSander Rossel14-Jan-24 23:40 
GeneralRe: .NET growing pains Pin
honey the codewitch15-Jan-24 2:17
mvahoney the codewitch15-Jan-24 2:17 
With the type of development you do, I don't see you using them, at least directly.

They're a bit into the weeds.

Okay, so like normally

C#
string foobar = "foobar"

string bar = foobar.Substring(3,3); // string copy


That's fine of course. One can copy strings. However, it's not efficient, and if you needed to do it a million times a second you might be sweating it.

C#
string foobar = "foobar";
ReadOnlySpan<char> sp = (ReadOnlySpan<char>)foobar; // calls op_Implicit on string
ReadOnlySpan<char> sbar = sp.Slice(3,3); // no copy! this holding basically a pointer to "bar" in foobar


Spans basically point to another thing's memory directly without copying. They are a useful way to speed up low level operations on strings and arrays when you need a "view" into them without copying the data.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix

GeneralRe: .NET growing pains Pin
Sander Rossel15-Jan-24 4:44
professionalSander Rossel15-Jan-24 4:44 
GeneralRe: .NET growing pains Pin
honey the codewitch15-Jan-24 4:47
mvahoney the codewitch15-Jan-24 4:47 
GeneralRe: .NET growing pains Pin
jschell15-Jan-24 5:34
jschell15-Jan-24 5:34 
GeneralRe: .NET growing pains Pin
honey the codewitch15-Jan-24 5:36
mvahoney the codewitch15-Jan-24 5:36 
GeneralWordle 939 Pin
StarNamer@work13-Jan-24 13:05
professionalStarNamer@work13-Jan-24 13:05 
GeneralRe: Wordle 939 Pin
Amarnath S13-Jan-24 13:16
professionalAmarnath S13-Jan-24 13:16 
GeneralRe: Wordle 939 Pin
Sandeep Mewara13-Jan-24 16:56
mveSandeep Mewara13-Jan-24 16:56 
GeneralRe: Wordle 939 Pin
OriginalGriff13-Jan-24 19:54
mveOriginalGriff13-Jan-24 19:54 
GeneralRe: Wordle 939 Pin
Cp-Coder14-Jan-24 1:25
Cp-Coder14-Jan-24 1:25 
Generalshort joke Pin
Salvatore Terress13-Jan-24 7:58
Salvatore Terress13-Jan-24 7:58 
GeneralRe: short joke Pin
Ștefan-Mihai MOGA13-Jan-24 8:03
professionalȘtefan-Mihai MOGA13-Jan-24 8:03 
GeneralRe: short joke Pin
kmoorevs13-Jan-24 8:07
kmoorevs13-Jan-24 8:07 
GeneralRe: short joke Pin
Ștefan-Mihai MOGA13-Jan-24 8:13
professionalȘtefan-Mihai MOGA13-Jan-24 8:13 
GeneralRe: short joke Pin
charlieg13-Jan-24 10:10
charlieg13-Jan-24 10:10 
GeneralRe: short joke Pin
Gary R. Wheeler14-Jan-24 7:03
Gary R. Wheeler14-Jan-24 7:03 
GeneralRe: short joke Pin
obermd14-Jan-24 8:15
obermd14-Jan-24 8:15 
GeneralWordle 938 Pin
StarNamer@work12-Jan-24 14:42
professionalStarNamer@work12-Jan-24 14:42 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.