Skip to content

transposed unnecessarily complicated, fundamentally wrong, overly opinionated #10855

@crazymonkyyy

Description

@crazymonkyyy
unittest{
	int[][] foo=[[1,2,3],[4,5,6],[7,8,9]];
	foo.transposed.writeln;
	foo.writeln; //prints []
}

By trying to avoid one allocation, transposed picks up unnecessary constraints and violates "view of data".

Instead it should just eagerly call the .array on the range of ranges for me as thats usually more correct and the only way it compiles anyway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions