JuliaLang/julia — pull request #4690 by dmbates (2013-10-30 17:50:08+00:00)
Title: Add showcompact method for vectors of Number's

Currently there is a peculiarity that `showcompact` applied to a floating point number produces a compact representation, similar to the representation the `print_matrix` method. The `showcompact` method for a vector of numbers does switch to a horizontal orientation but uses the full precision.

This pull request adds a `showcompact` method for vectors of numbers to use showcompact on each number. It doesn't use `tty_cols()` and hence could produce very long lines on long vectors.
```jl
julia> r5 = rand(5)
5-element Array{Float64,1}:
0.381319
0.337257
0.409786
0.9746
0.679875

julia> showcompact(r5)
[0.381319,0.337257,0.409786,0.9746,0.679875]
```

I can understand if a more sophisticated version is desired but I do think that the current situation of writing full precision representations in `showcompact` should be changed.