en.javascript.info icon indicating copy to clipboard operation
en.javascript.info copied to clipboard

Suggestion: mention string interning

Open icncsx opened this issue 5 years ago • 13 comments

If we want to be completely clear in the object copy lesson, we can include a snippet that mentions string interning, where since strings are immutable, only one instance is stored in memory and any future references to that same string can be referred to the singleton in existence. So yes, primitives are "copied as a whole value" in behavior, but it's a little bit more complicated than that if we get into implementation detail.

Is this too much? Thoughts? JavaScript.info seems to be a pretty thorough resource, so I can definitely see it including this kind of detail.

icncsx avatar Jun 01 '20 22:06 icncsx

That topic - string internals - may become an article in the "Optimization" section.

iliakan avatar Jun 02 '20 07:06 iliakan

This sounds like such a cool idea! String interning seems like a key concept that developers must learn regarding the internal workings of the immutable string pool. I am looking to start contributing and javascript.info has been a great resource in my coding experience as well. So it would be an honor and my pleasure if I got the opportunity to work on this with @icncsx . Please let me know thanks!

Akash2002 avatar Mar 14 '21 14:03 Akash2002

Go ahead, guys! =)

iliakan avatar Mar 14 '21 14:03 iliakan

@icncsx If you are available to work with me on this, please let me know. Thanks!

Akash2002 avatar Mar 14 '21 15:03 Akash2002

@iliakan I will keep you posted on how it goes. Is there an assignment tag, so that this issue is like assigned to me or something so that others don't get confused.

Akash2002 avatar Mar 14 '21 15:03 Akash2002

@Akash2002 Feel free to solo this!

icncsx avatar Mar 14 '21 19:03 icncsx

Hey I am super new to contributing and stuff and I was wondering if you could provide me some guidance on how to get started with this. So, I should be looking to add the string interning guide to the strings lesson right? And is this a statically generated website, given all the markup files that I see? Also, how would I be able to test this on my local machine? Thank you so much for your time! I can't wait to get started with collaborating on open source projects!

Akash2002 avatar Mar 16 '21 01:03 Akash2002

Please just write an article anywhere, even on google docs. It is't worthy, I'll help with that =)

iliakan avatar Mar 16 '21 07:03 iliakan

Awesome. I'll keep you posted. Thanks again!

Akash2002 avatar Mar 16 '21 15:03 Akash2002

@Akash2002 How's it coming along? :)

icncsx avatar Mar 26 '21 21:03 icncsx

@Akash2002 How's it coming along? :)

Hey! I will be starting to work on it soon. I have had a lot of work recently, but I'm still super interested in this PR, so I'll keep you posted! Sorry for the wait, thanks!

Akash2002 avatar Mar 26 '21 23:03 Akash2002

Hey I have started writing the article in Markdown, I'll provide a link soon! Thanks!

Akash2002 avatar Mar 30 '21 15:03 Akash2002

@Akash2002 Any progress?

icncsx avatar Oct 23 '21 01:10 icncsx

This sounds like such a cool idea! String interning seems like a key concept that developers must learn regarding the internal workings of the immutable string pool. I am looking to start contributing and javascript.info has been a great resource in my coding experience as well. So it would be an honor and my pleasure if I got the opportunity to work on this with @icncsx . Please let me know thanks!

sumit1125 avatar Jun 29 '23 20:06 sumit1125