# A kind of "two language problem" in Julia Ecosystem

**URL:** <https://discourse.julialang.org/t/a-kind-of-two-language-problem-in-julia-ecosystem/100445>\
**Category:** General Usage\
**Created:** [June 16, 2023, 11:56am UTC](https://discourse.julialang.org/t/a-kind-of-two-language-problem-in-julia-ecosystem/100445 "2023-06-16T11:56:25Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![algunion](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/algunion/32/51630_2.png) [@algunion](https://discourse.julialang.org/u/algunion)\
**Post date:** [June 16, 2023, 1:41pm UTC](https://discourse.julialang.org/t/a-kind-of-two-language-problem-in-julia-ecosystem/100445/7 "2023-06-16T13:41:05Z")

</div>

Thanks a lot. This way of viewing things helps.

Recently I delved into [Cobweb.jl](https://github.com/JuliaComputing/Cobweb.jl/blob/main/src/Cobweb.jl) - where they have a function `h` that can be used with appended dot notation - with out-of-the-box intellisense (e.g. `h.div`, `h.p` - etc.).

I am not saying that I am the only guy who managed to review ALL of Julia’s documentation (I certainly didn’t).

But from what I read, I never encountered the following possibility (and I am very pleased by this finding).

Now this might be something naive and not a big deal for most of the experienced Julia programmers - but for me, it was an _aha_ moment, especially because I could do this on a function.

```julia
function myh(a)
	"you called myh using property with value $a"
end

Base.getproperty(::typeof(myh), tag::Symbol) = myh(string(tag))
Base.propertynames(::typeof(myh)) = [:x, :y, :z]

myh.z # outputs: "you called myh using property with value z"

```

And now I can have intellisense for my `myh` function (e.g. `myh.x`, `myh.y`).

While we have this documentation for [propertynames](https://docs.julialang.org/en/v1/base/base/#Base.propertynames), it wasn’t clear to me that the above feat was even possible - somewhat that doesn’t follow from the documentation (or maybe there is another relevant material that I missed).

Now, when the “unknown unknown” became “known known,” it is somehow easy to look back and give the explanation: this is the power of multiple dispatch at work. But my brain wasn’t able to travel the other way around: and this confirms what you said (these kinds of solutions have a better chance to present themselves when actually trying to achieve/solve something).

Anyway - thanks for your time and explanations.

I’ll keep up the exciting activity of reading source code - I never thought it might be so rewarding.

---

_[View the full topic](https://discourse.julialang.org/t/a-kind-of-two-language-problem-in-julia-ecosystem/100445)._
