# @showln in Base?

**URL:** https://discourse.julialang.org/t/showln-in-base/46957
**Category:** New to Julia
**Created:** [September 20, 2020, 3:26pm UTC](https://discourse.julialang.org/t/showln-in-base/46957 "2020-09-20T15:26:53Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [September 20, 2020, 3:26pm UTC](https://discourse.julialang.org/t/showln-in-base/46957/1 "2020-09-20T15:26:53Z")

</div>

Hi,  
I found the @tim.holy’s @showln macro pretty useful and I wonder if it should be included into Base ?

---

<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: [September 20, 2020, 3:46pm UTC](https://discourse.julialang.org/t/showln-in-base/46957/2 "2020-09-20T15:46:07Z")

</div>

Can you provide some link to it or an example? I’m not aware of this macro or what it does. I do believe you that it is useful because that’s pretty much how he does things.

---

<div class="post-metadata">

### Author: ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)
#### Post date: [September 20, 2020, 5:29pm UTC](https://discourse.julialang.org/t/showln-in-base/46957/3 "2020-09-20T17:29:30Z")

</div>

[https://github.com/timholy/DebuggingUtilities.jl#showln](https://github.com/timholy/DebuggingUtilities.jl#showln)

---

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [September 20, 2020, 6:00pm UTC](https://discourse.julialang.org/t/showln-in-base/46957/4 "2020-09-20T18:00:54Z")

</div>

Cool macro.  
I am going to start using that.

As a general guiding principle, if something can be done in a package, it should be done in a package rather that being in Base/StdLibs.  
This is primarily because Base/StdLibs are second class packages.

You can’t update to use a newer StdLib with an older Julia version – which is a problem for people who want to use the Long Term Support (LTS) release.

You also can’t make breaking changes if you workout e.g. a better API, since that would be a breaking change to Julia itself.

An arguably exception to this general principle is if Base /stdlibs already does something badly/less precisely. Then maybe it should have the feature to do it well  
Which could be the case for `@showln` , it’s kind of a better `@show`.  
.

---

<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: [September 20, 2020, 6:06pm UTC](https://discourse.julialang.org/t/showln-in-base/46957/5 "2020-09-20T18:06:32Z")

</div>

Good sales pitch. Start off with a “no”, work your way to a “yes”!

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [September 21, 2020, 6:23am UTC](https://discourse.julialang.org/t/showln-in-base/46957/6 "2020-09-21T06:23:22Z")

</div>

> [@oxinabox](#):
>
> Which could be the case for `@showln` , it’s kind of a better `@show` .

Which demonstrates an important point: it is frequently possible to improve on existing solutions. But once they are in the standard libraries, updating them becomes a slower and more difficult process.

A lot of things are useful, but they should not be in `Base` so that they can continue to be improved, or deprecated when better solutions emerge. `using DebuggingUtilities` is not that big of a hassle.

---

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [September 21, 2020, 7:20am UTC](https://discourse.julialang.org/t/showln-in-base/46957/7 "2020-09-21T07:20:28Z")

</div>

Thank you for your replies !

I though `@showln` might be suited for Base because I considered about a million time to write a similar macro and only discovered it exists recently.

Observing that some very experienced Julia developers

1. express an interest for `@showln`,
2. did not knew about it,

I conclude that there is an issue with the `@showln`’s discoverability 😉

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [September 21, 2020, 7:40am UTC](https://discourse.julialang.org/t/showln-in-base/46957/8 "2020-09-21T07:40:30Z")

</div>

> [@LaurentPlagne](#):
>
> I conclude that there is an issue with the `@showln` 's discoverabilit

Yes, but the answer to that is not putting things in `Base`, but making eg [juliahub](https://juliahub.com/) index the package. My understanding that having generated docs would achieve this.

---

<div class="post-metadata">

### Author: ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)
#### Post date: [September 21, 2020, 8:20am UTC](https://discourse.julialang.org/t/showln-in-base/46957/9 "2020-09-21T08:20:25Z")

</div>

I understand the care that must be taken with Base or Stdlibs extensions.

Although I still think that the specific features of `@showln` which is :

- very simple
- of general and **early** interest

makes it a natural _ **basic** _ functionality.

---

<div class="post-metadata">

### Author: ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)
#### Post date: [September 21, 2020, 10:35am UTC](https://discourse.julialang.org/t/showln-in-base/46957/10 "2020-09-21T10:35:13Z")

</div>

Or for example writing a blog post.  
“Ten useful tools I wish i knew about when starting to learn julia”  
etc

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [September 21, 2020, 10:40am UTC](https://discourse.julialang.org/t/showln-in-base/46957/11 "2020-09-21T10:40:08Z")

</div>

To make it easier to use, I’ve updated the package and submitted a registration request: [https://github.com/JuliaRegistries/General/pull/21695](https://github.com/JuliaRegistries/General/pull/21695)  
That should be enough to get it indexed by juliahub.  
I’m not opposed to the idea of moving the new version of `@showln` into Base, though.

Differences from the previous v0.1 (unregistered) are mainly that `@showln` no longer uses indentation to indicated recursion depth (that’s now `@showlnt`), but in exchange it doesn’t cause the massive performance hit of `@showlnt`. Collecting a backtrace seemed like the only way to get callsite info back when DebuggingUtilities was first implemented, but we now have ` __source__ ` and that’s what the new `@showln` uses.
