in the way of changing my code to use table lookups i wrote this:

private immutable bool[256] cc_specialChars =
  iota(0, 0x100)
.map!(i => i <= 32 || i == '"' || i == '\\' || i == ';' || i == '#' || i == 127)
  .array;

and got compilation error: function iv.cmdcon.__lambda34!int.__lambda34 is not accessible from module algorithm.

i perfectly understand why compiler complains, but i think that this restriction can be weakened a little for modules, imported as 'private import modname'. i.e. if importing like this:

private import std.algorithm;

std.algorithm should have full acces to private vars from the current module. this will not break existing code (i think) and will allow to avoid copypasting.

Reply via email to