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

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.

You mean like a closure over getproperty?

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.

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

1 Like

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.