JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.72k stars 5.48k forks source link

new syntax for transpose #21037

Closed StefanKarpinski closed 4 years ago

StefanKarpinski commented 7 years ago

Now that .op is generally the vectorized form of op, it's very confusing that .' means transpose rather than the vectorized form of ' (adjoint, aka ctranspose). This issue is for discussing alternative syntaxes for transpose and/or adjoint.

KristofferC commented 6 years ago
screen shot 2018-09-10 at 11 29 56
mbauman commented 6 years ago

Yeah, looks like that on GitHub to me, too. But it's an overbar. Copy and paste into my terminal shows:

screen shot 2018-09-10 at 10 31 24 am

Too clever and cute. I still do like the combining characters, though, and I think 'ᵀ is nice.

johnalx commented 4 years ago

-100 to changing adjoint, since it's one of the awesome things that makes writing Julia code as clear as writing math, plus conjugate transpose is usually what you want anyway so it makes sense to have an abbreviated syntax for it.

There is a certain arrogance to a statement like this. Consider that some finite proportion of developers explicitly do not want adjoint() but need transpose().

Case and point for us working with symbolic calculations for modeling the default ' operator would cause for example the pseudo-inverse (A'*A)\(Ab) or a quadratic form `v'A*v` to return erroneously long and complex results that cannot be reduced.

Maybe the solution is some kind of compiler directive declaring the meaning of '.