I actually think the plan of [a,b,c] for construction without concatenation and [a;b;c] and [a b c] for concatenation is pretty good. I no longer feel that there's any need for a new bracket like [| |]. The thing that clicked for me is that [a;] isn't really concatenation at all anyway.
On Wed, Feb 25, 2015 at 4:58 PM, Simon Danisch <[email protected]> wrote: > As Julia was the first language to introduce me to this kind of > constructs, I'm not sure about your used terms. > Concatenate for me would firstly mean, to just connect elements (that's at > least what the German translation suggests), which I would apply to the > process of putting the elements together into one array. The elements in my > case are the Vectors. > You seem to use it as synonymous with concatenation + flattening (sticking > to the function names I guess). > I'd say [a,b] is supposed to concatenate, but shouldn't flatten, right? > So yes, different syntax for concatenating, and concatenating+flattening > would make this case much, much clearer. > Then it's not this fuzzy magic thing, that sometimes happens and sometimes > not and both clearly encapsulates a concept and use the same basic syntax. > So: > [vec, vec] => [vec, vec] # With optional typing, ensuring that you don't > end up with Any[] > [vec vec] => [vec vec] # With optional typing, ensuring that you don't > end up with Any[] > > [| vec, vec |] => [el1, el2, el3, el4, ...]# With optional typing, > ensuring that you don't end up with Any[] > [| vec vec |] => [el el2 ; el3 el4]# With optional typing, ensuring that > you don't end up with Any[] > > I do think, that this is very clear and consistent and doesn't leave > anything in doubt! > > > Am Mittwoch, 25. Februar 2015 19:00:01 UTC+1 schrieb Simon Danisch: > >> Hi there, >> I thought default concatenation was deprecated, to make it easier to >> create arrays of arrays... But it became rather impossible and confusing in >> the horizontal case, from what I see. >> Is there really not a single method left from the few ways in 0.35 of >> creating a horizontal vector of vectors? >> 0.4: >> https://gist.github.com/SimonDanisch/6972c1c090c608738e83#file-cat0-4-jl >> 0.3.5: >> https://gist.github.com/SimonDanisch/058ef76b2583c620b667#file-cat3-5-jl >> >> Am I missing something, or is this a bug?! >> >> Best, >> Simon >> >
