3 ms·
D has a "pure" keyword and it works quite nicely. Agreed about the standards committee lol
by voldacar 6y ago
D has a "pure" keyword and it works quite nicely. Agreed about the standards committee lol
- moonchild 6y agoD's pure doesn't work very well at all. Because there's no ecosystem of pure functions, a single impure function in the transitive closure of your dependencies can ruin your day. (Unless you depend on no code written by other people.) Compare with haskell, where effects are enumerated and purity is the default: most functions are pure.
- mhh__ 6y agoIdiomatic D code tends to use a lot of templates so this is true but much more prevalent if you write C-with-pure than (say) the code I tend to write (an incomplete C preprocessor+binding generator at compile time is the most D-ish thing I've done yet)
- voldacar 6y ago> Unless you depend on no code written by other people. Yeah that is me. I can certainly see how a program that uses a lot of libraries would have issues with pure though. Not sure what the solution to that would be other than going full haskell mode, which isn't what people who use C++/D would want anyways