Тёмный
No video :(

what is `Symbol` in js (intermediate) anthony explains  

anthonywritescode
Подписаться 40 тыс.
Просмотров 4,4 тыс.
50% 1

I recently was writing some JS and wondered what `Symbol` was -- and now that I know I'm sharing it with you
playlist: • anthony explains
==========
twitch: / anthonywritescode
dicsord: / discord
twitter: / codewithanthony
github: github.com/asottile
stream github: github.com/anthonywritescode
I won't ask for subscriptions / likes / comments in videos but it really helps the channel. If you have any suggestions or things you'd like to see please comment below!

Опубликовано:

 

12 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 11   
@Phaust94
@Phaust94 11 месяцев назад
Some js - ahh, refreshing! Especially the === part.
@sparkyb6
@sparkyb6 11 месяцев назад
For those of us that are more familiar with Python (which based on the topics of your channel I assume is most of us), it sounds like they mostly service the same function as Python's dunder method? There are two big differences I see. It seems like JavaScript needed a separate sort of namespace instead of just using unlikely to be used names because JavaScript objects are used like objects and like dictionaries, so you wouldn't want your specially named member to be iterated like a normal key (I assume that iteration skips symbols). The other difference that is nice is that because symbols are singletons, users can create their own without conflicting with future built-in symbols even if they share the same "name", whereas if I declared my own dunder method in Python, I could be in trouble if someone else uses the same name in the future.
@anthonywritescode
@anthonywritescode 11 месяцев назад
indeed! python has this problem all the time because people "invent" their own double-double-underscore methods that later get clobbered by the stdlib inventing the same one -- Symbol doesn't have this limitation since they're entirely separate namespaces
@alexismandelias
@alexismandelias 11 месяцев назад
So a global object for creating and storing unique objects which we want to distinguish from one another and which we want to be unique and immutable
@YameenMohammad-fw1n
@YameenMohammad-fw1n 11 месяцев назад
Anthony, can you please make a video on how a programming language is made? actually I am trying to understand that how language is made but having some doubts. so please make a video. Thanks in advance
@semasemasemasema
@semasemasemasema 11 месяцев назад
Can you make a video about pickle and serialization in python? Would love to see it
@kai3341
@kai3341 11 месяцев назад
Thank you for video. Also thank you for your English
@qexat
@qexat 11 месяцев назад
`Symbol.bind`: Symbol is a monad?? 😮
@q.w.e.r.t.y
@q.w.e.r.t.y 11 месяцев назад
Basically a JS version of Python's __iter__ 🤔
@33v4.
@33v4. 11 месяцев назад
niiiice
Далее
iPhone Завис на яблоке!
00:54
Просмотров 84 тыс.
Why Signals Are Better Than React Hooks
16:30
Просмотров 469 тыс.
Proxy и Symbol в JavaScript
48:29
Просмотров 10 тыс.
Learn JSON in 10 Minutes
12:00
Просмотров 3,1 млн
Actual use case for JavaScript PROXY!
13:09
Просмотров 12 тыс.
iPhone Завис на яблоке!
00:54
Просмотров 84 тыс.