D component programming is a joke (Was: Re: Component programming)
Walter Bright
newshound2 at digitalmars.com
Wed Jul 31 15:46:04 PDT 2013
On 7/31/2013 3:23 PM, bearophile wrote:
> The situation should be improved for D/dmd/Phobos, otherwise such D component
> programming remains partially a dream, or a toy.
Ironically, the component program from the article I wrote:
void main() {
stdin.byLine(KeepTerminator.yes) // 1
map!(a => a.idup). // 2
array. // 3
sort. // 4
copy( // 5
stdout.lockingTextWriter()); // 6
}
is 2x faster than the Haskell version:
import Data.List
import qualified Data.ByteString.Lazy.Char8 as L main = L.interact $
L.unlines . sort . L.lines
More information about the Digitalmars-d
mailing list