# Have you ever used "the" as a function or struct name? What was it meant for?

**URL:** <https://discourse.julialang.org/t/have-you-ever-used-the-as-a-function-or-struct-name-what-was-it-meant-for/110859>\
**Category:** Offtopic\
**Created:** [February 27, 2024, 6:04pm UTC](https://discourse.julialang.org/t/have-you-ever-used-the-as-a-function-or-struct-name-what-was-it-meant-for/110859 "2024-02-27T18:04:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadish-d](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sadish-d/32/48058_2.png) [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Post date:** [February 27, 2024, 6:04pm UTC](https://discourse.julialang.org/t/have-you-ever-used-the-as-a-function-or-struct-name-what-was-it-meant-for/110859/1 "2024-02-27T18:04:44Z")

</div>

I just wrote a function called `the` to extract properties from an object. So you can do `object.property` or `the(property, object)` in a partially-applied way: `the(property)(object)`. Bad idea?

Edit: It works fine, but I’m wondering if a name like “the” should be saved for better purposes.

---

<div class="post-metadata">

**Author:** ![tbeason](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tbeason/32/15898_2.png) [@tbeason](https://discourse.julialang.org/u/tbeason)\
**Post date:** [February 27, 2024, 6:08pm UTC](https://discourse.julialang.org/t/have-you-ever-used-the-as-a-function-or-struct-name-what-was-it-meant-for/110859/2 "2024-02-27T18:08:36Z")

</div>

You mean like a closure over `getproperty`?

---

<div class="post-metadata">

**Author:** ![sadish-d](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sadish-d/32/48058_2.png) [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Post date:** [February 27, 2024, 6:21pm UTC](https://discourse.julialang.org/t/have-you-ever-used-the-as-a-function-or-struct-name-what-was-it-meant-for/110859/3 "2024-02-27T18:21:08Z")

</div>

Yes. It works fine, but I’m wondering if a name like “the” should be saved for better purposes. I’ll add this explanation to my original post actually.

---

<div class="post-metadata">

**Author:** ![adienes](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/adienes/32/37459_2.png) [@adienes](https://discourse.julialang.org/u/adienes)\
**Post date:** [February 27, 2024, 6:35pm UTC](https://discourse.julialang.org/t/have-you-ever-used-the-as-a-function-or-struct-name-what-was-it-meant-for/110859/4 "2024-02-27T18:35:17Z")

</div>

fyi if you have not seen it, this kind of use is what `Accessors.jl` is intended for

---

<div class="post-metadata">

**Author:** ![sadish-d](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sadish-d/32/48058_2.png) [@sadish-d](https://discourse.julialang.org/u/sadish-d)\
**Post date:** [February 27, 2024, 6:47pm UTC](https://discourse.julialang.org/t/have-you-ever-used-the-as-a-function-or-struct-name-what-was-it-meant-for/110859/5 "2024-02-27T18:47:41Z")

</div>

I hadn’t looked into it much. I might not use it for now because I don’t really need to “mutate” immutable structs for what I’m working on. But thanks for the pointer.
