Issue 1:
Following the discussion on Arrays in Julia 0.5 #13157 , I want to suggest including new operators for the tensor sum (or direct sum) operation and for the tensor product (outer product).

The tensor sum (direct sum) is a way of combining both vector spaces as well as tensors (vectors, matrices or higher order arrays) of the same order. The tensor sum of two vector spaces V1 ⊕ V2 simply concatenates their two bases. Similarly, the tensor sum of two vectors v1 ⊕ v2 is their concatenation, vcat(v1,v2). For higher order tensors (higher dimensional arrays), all the vector spaces associated with each dimension are concatenated, and the elements of the arrays are filled in their original positions, resulting in a sparse (block diagonal) tensor. For example, the tensor sum of two matrices A ⊕ B is [A 0; 0 B]. Care would need to be taken for row vectors stored as 1-by-n arrays, but hopefully this will be resolved separately in Julia 0.5. For tensor sum, I suggest we use the usual symbol ⊕ (use \oplus in the REPL), but we could also consider ++ or other operations (please suggest). The tensor sum operator might be useful in other concatenation contexts, such as string concatenation (since ⊕ is non-commutative and is basically the correct monoid for concatenating vectors of characters), but this is not the main point at this stage.

The tensor product (outer product) on vector spaces V1 ⊗ V2 creates a new basis with elements that are all possible outer products of the basis elements of V1 and of V2, and so the dimension of the resulting vector space becomes the product of the two individual dimensions. Julia already implements kron() which is the same idea, but restricted to only vectors and matrices. We could generalize kron and use ⊗ (\otimes in the REPL) or ** (or something else) to implement this. Tensor products might be similar to other operations in other contexts - for example the outer join in relational algebra behaves similarly, so we could implement that for DataFrames.

Tensors and multilinear algebra are described by bi-monoidal categories (with the two monoids ⊗ and ⊕) so these to operations will make that a little simpler to write and reason about. Besides, these operators may have use in other fields where concatenation or outer products make sense. What is the policy on adding new operators to Julia? Is this frowned upon? Can we use unicode symbols, or must we continue with multiple ASCII symbols (which I find a bit ugly...)? Does anyone else think this is useful? If the community wants this feature, I could work on it and generate a PR (though the parser confuses me...)

Issue 2:
It appears that overwriting a function defined within another function can cause strange ordering issues. MWE:

function do_test()
function innerfunc()
println(stderr, "innerfunc")
end
println(stderr, "pre-innerfunc")
innerfunc()
println(stderr, "post-innerfunc")

# Overwrite innerfunc
innerfunc() = nothing
println("innerfunc is now overwritten")
end

do_test()

Expected output:

pre-innerfunc
innerfunc
post-innerfunc
innerfunc is now overwritten

Actual output:

pre-innerfunc
post-innerfunc
innerfunc is now overwritten

It appears that the optimizer records the final value of innerfunc() and completely disregards the original value:

julia> @code_lowered do_test()
CodeInfo(
1 ─ innerfunc = %new(Main.:(var"#innerfunc#3"))
│ Main.println(Main.stderr, "pre-innerfunc")
│ (innerfunc)()
│ Main.println(Main.stderr, "post-innerfunc")
│ %5 = Main.println("innerfunc is now overwritten")
└── return %5
)

This is reproducible on every release of from 1.0 to master, I didn't bother looking farther back than 1.0.