# Conditional context for macros

**URL:** <https://forum.devtalk.com/t/conditional-context-for-macros/6989>\
**Category:** Blogs/Articles/Talks/Podcasts\
**Tags:** elixir\
**Created:** [13 February 2021 17:30 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989 "2021-02-13T17:30:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![mudasobwa](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mudasobwa/32/867_2.png) [@mudasobwa](https://forum.devtalk.com/u/mudasobwa)\
**Post date:** [13 February 2021 17:30 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/1 "2021-02-13T17:30:46Z")

</div>

Blogged on how to use ` __CALLER__.context` and ` __CALLER__.context_modules` to build macros, which behaviour depends on the context (different/extended abilities when in guard, when in match, elsewhere.)

[https://rocket-science.ru/hacking/2021/02/13/conditional-context](https://rocket-science.ru/hacking/2021/02/13/conditional-context)

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [13 February 2021 17:39 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/2 "2021-02-13T17:39:05Z")

</div>

You’re on a roll Aleksei! Keep it up 😃

I enjoyed reading about your handle btw!

> Nowadays I got used to a nickname “mudasobwa,” proudly granted by rwandian linguists:

> Kinyarwanda, the language spoken by most Rwandans, has no words for many basic technical and computing terms, including the very word “computer”

> After debating whether to borrow English or French terms or come up with their own native word, the group settled on “mudasobwa”…

> …“something or someone that does not make mistakes”

🤖

---

<div class="post-metadata">

**Author:** ![mudasobwa](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mudasobwa/32/867_2.png) [@mudasobwa](https://forum.devtalk.com/u/mudasobwa)\
**Post date:** [13 February 2021 18:31 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/4 "2021-02-13T18:31:15Z")

</div>

Yeah, back in, I believe, 2005 or like, I was registering on some service and all the handles that could have been read nearly similar to _aleksei_ were taken.

Undecided, I switched to reading news and that was the first news, literally thrown into my face by the feed. So I had next to zero chance to avoid trying it for, as I thought, a while. It’s still with me because even nowadays this handle is almost always free 🙂

Unfortunaly, the part about mistakes lies.

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [13 February 2021 19:07 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/5 "2021-02-13T19:07:25Z")

</div>

> [@mudasobwa](#):
>
> Yeah, back in, I believe, 2005 or like, I was registering on some service and all the handles that could have been read nearly similar to _aleksei_ were taken.

It’s so much worse now - particularly when trying to find a decent .com!! 😂

> [@mudasobwa](#):
>
> Undecided, I switched to reading news and that was the first news, literally thrown into my face by the feed.

The universe wanted you to have it 🕶

> [@mudasobwa](#):
>
> Unfortunaly, the part about mistakes lies.

Maybe they were imaging what it would be like in the future? Haha! 🤖

---

<div class="post-metadata">

**Author:** ![dimitarvp](https://forum.devtalk.com/user_avatar/forum.devtalk.com/dimitarvp/32/5599_2.png) [@dimitarvp](https://forum.devtalk.com/u/dimitarvp)\
**Post date:** [13 February 2021 21:51 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/6 "2021-02-13T21:51:52Z")

</div>

> [@AstonJ](#):
>
> It’s so much worse now - particularly when trying to find a decent .com!! 😂

There are _so many_ domain suffixes nowadays though!

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [13 February 2021 22:23 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/7 "2021-02-13T22:23:43Z")

</div>

I know 😂 …but you still can’t beat the top tier tlds imo 🙃 .com, .net (esp if a ‘network’ of sorts) and .org (for organisations). Country specific tlds are great for country-specific stuff too.

TLDs matter less for mobile/desktop apps tho, but I think when you are primarily a website .com is the gold standard 🕶

---

<div class="post-metadata">

**Author:** ![mudasobwa](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mudasobwa/32/867_2.png) [@mudasobwa](https://forum.devtalk.com/u/mudasobwa)\
**Post date:** [14 February 2021 05:28 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/8 "2021-02-14T05:28:48Z")

</div>

```auto
❯ whois mudasobwa.net
No match for domain "MUDASOBWA.NET".

❯ whois mudasobwa.org
NOT FOUND

```

I am fine with [mudasobwa.ru](http://mudasobwa.ru) for my personal adventures, though 🙂

---

<div class="post-metadata">

**Author:** ![AstonJ](https://forum.devtalk.com/user_avatar/forum.devtalk.com/astonj/32/7_2.png) [@AstonJ](https://forum.devtalk.com/u/AstonJ)\
**Post date:** [14 February 2021 15:09 UTC](https://forum.devtalk.com/t/conditional-context-for-macros/6989/9 "2021-02-14T15:09:01Z")

</div>

If it was me I would have got them all 🤣

I think I have a domain problem - I have so many that I get a discount from my provider! 🙊
