site examples
crimaniak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu May 25 08:41:47 PDT 2017
I tried to run an example from the site. Example from
https://dlang.org/phobos/std_regex.html#replaceAllInto section.
And this is problem number 0: I can't give a link to the example,
only to section. The section can be long, there can be more than
one example, so it's good to have an anchor for each example.
Problem #1: "Compilation output (255: Unknown signal 255)
unable to fork: Cannot allocate memory." As I understand it, this
is a common problem, and it leaves a bad impression. Ok, I copy
example text and try to compile it. Oh, I need to make main().
Ok. "t1.d(6): Error: undefined identifier 'regex'
t1.d(12): Error: undefined identifier 'replaceAllInto'
t1.d(14): Error: 'writeln' is not defined, perhaps you need to
import std.stdio; ?"
Problem #3: we have imports in the example, but not all imports.
Ok, I add it. Compile, run. A lot of commas. Is this proof that
the method worked? Yes. Do these commas illustrate how this
method works? Absolutely not. This is a replacement method, so I
expect to see "before" and "after".
It seems to me that examples on the site require additional work
and in the current form are counterproductive in terms of
attracting new users.
More information about the Digitalmars-d-learn
mailing list