News for hackers. Stuff that matters.
Re:Want cleaner code? Use the rule of six by WalterBright on Saturday September 24, 2022 @04:21PM (#32966233)
D does too:

    import std.algorithm, std.array, std.stdio;
    // Print sorted lines of a file.
    void main()
    {
     auto sortedLines = File("file.txt")   // Open for reading
                        .byLineCopy()      // Read persistent lines
                        .array()           // into an array
                        .sort();           // then sort them
     foreach (line; sortedLines)
         writeln(line);
    }

There are no comments on this comment yet.