这个dump是不是有点Bug

今天用dump的时候貌似有点状况:

#Julia Version 1.0.0 (2018-08-08)(版本可能有点旧了)
julia> x = :(1+1)
:(1 + 1)

julia> y = :(:(:($$$x)))
:($(Expr(:quote, :($(Expr(:quote, :($(Expr(:$, :($(Expr(:$, :(1 + 1)))))))))))))#<--正确的显示

julia> dump(y)
Expr
  head: Symbol quote
  args: Array{Any}((1,))
    1: Expr
      head: Symbol quote
      args: Array{Any}((1,))
        1: Expr
          head: Symbol $
          args: Array{Any}((1,))
            1: Expr
              head: Symbol $
              args: Array{Any}((1,))
                1: Expr     #<---(到这里就没有了)

julia>

最后一节不见了,而且更加奇怪的就是:

julia> show(dump(y))
Expr
  head: Symbol quote
  args: Array{Any}((1,))
    1: Expr
      head: Symbol quote
      args: Array{Any}((1,))
        1: Expr
          head: Symbol $
          args: Array{Any}((1,))
            1: Expr
              head: Symbol $
              args: Array{Any}((1,))
                1: Expr
nothing

还是这是dump的(一种我无法理解的)巧妙设计???我不知道这个之前有没有提过issue。

输出长度有限制

 help?> dump
search: dump

  dump(x; maxdepth=8)

  Show every part of the representation of a value. The depth of the output is truncated at maxdepth.

maxdepth 改大一点就可以了

julia> y = :(:(:($$$x)))
:($(Expr(:quote, :($(Expr(:quote, :($(Expr(:$, :($(Expr(:$, :(1 + 1)))))))))))))

julia> dump(y, ; maxdepth=64)
Expr
  head: Symbol quote
  args: Array{Any}((1,))
    1: Expr
      head: Symbol quote
      args: Array{Any}((1,))
        1: Expr
          head: Symbol $
          args: Array{Any}((1,))
            1: Expr
              head: Symbol $
              args: Array{Any}((1,))
                1: Expr
                  head: Symbol call
                  args: Array{Any}((3,))
                    1: Symbol +
                    2: Int64 1
                    3: Int64 1