Тёмный

The right way to update Elixir structs (and how not to do it 😁) 

German Velasco
Подписаться 1,7 тыс.
Просмотров 694
50% 1

I think there is a right way (and a wrong way) to update Elixir structs -- at least if you want to know when you accidentally type the wrong thing! So, I made this short video to show the differences. For more videos like this, check out ElixirStreams.com

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

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@nesocode
@nesocode 3 месяца назад
Your short videos are goldmine for Elixir and Phoenix. Thank you.
@germanvelasco
@germanvelasco 3 месяца назад
Thank you! Love to hear that. 🙌
@Samuel-pg7tg
@Samuel-pg7tg 3 месяца назад
Excellent
@pauloffborba
@pauloffborba 3 месяца назад
Great tips ❤
@Rossvanzyl
@Rossvanzyl 3 месяца назад
fantastic tip!
@germanvelasco
@germanvelasco 3 месяца назад
Thanks! 🙌
@g54pcys
@g54pcys 3 месяца назад
Is your Vim config publicly available anywhere? I'd love to see your Vim Elixir setup.
@DenysGonchar-sg7br
@DenysGonchar-sg7br 3 месяца назад
Sorry, but that is bad advice. all examples in the video trigger runtime error. it must be %StructName{struct | field: new_value} instead, this would cause compilation error on typo.
@germanvelasco
@germanvelasco 3 месяца назад
I love that one. That's why it's on the video. Some people say they don't like it b/c it's not pipeable -- hence the alternative to Map.replace!.
@DenysGonchar-sg7br
@DenysGonchar-sg7br 3 месяца назад
@@germanvelasco What's on the video is map update syntax %{any_map_or_struct | field: new_value}, and it's not the same.
@germanvelasco
@germanvelasco 3 месяца назад
@@DenysGonchar-sg7br oh no! That's a mental lapse on my side during the video. That's definitely what I intended to record 😃Thanks for clarifying!
@juliolinarezescobar
@juliolinarezescobar 3 месяца назад
an awesome elixir pills
@JohnHidey
@JohnHidey 8 дней назад
What about using struct/2 function of the Kernel module
@germanvelasco
@germanvelasco 8 дней назад
Yeah, that's another good way!
@solvm1652
@solvm1652 3 месяца назад
Preach
@germanvelasco
@germanvelasco 3 месяца назад
😆
@geraldodev
@geraldodev 3 месяца назад
A follower :)
Далее
Tracing in Elixir with Recon
3:46
Просмотров 589
А Вы за пластику?
00:31
Просмотров 12 тыс.
Automating Advent of Code Setup with Igniter
9:47
Просмотров 1 тыс.