C is Brittle D is Plastic
H. S. Teoh
hsteoh at qfbox.info
Tue Mar 24 20:17:16 UTC 2026
On Tue, Mar 24, 2026 at 08:50:26PM +0100, Timon Gehr via Digitalmars-d wrote:
[...]
> ```d
> import std.stdio;
>
> string readAndLog(string filename){
> import std.file;
> auto text=readText(filename);
> write(filename," read successfully!\n");
> return text;
> }
>
> void main(){
> writeln(readAndLog("important_data.txt"));
> }
> ```
>
> https://github.com/dlang/dmd/issues/19272
>
> So what we have now is a compromise: It's both broken and not entirely
> straightforward.
And the solution will add yet more complication to an already complex
import symbol resolution system. :-D
T
--
What do you get if you throw a grenade into a French kitchen? Linoleum blown apart.
More information about the Digitalmars-d
mailing list