www.digitalmars.com         C & C++   DMDScript  

digitalmars.dip.ideas - add "har" as official (enough) grammar

reply monkyyy <crazymonkyyy gmail.com> writes:
dlang.io does the `--- foo.d` to mean "the stuff under this is 
part is foo.d"


automagicly but the compiler needs to know to ignore it with a 
fairly lazy hack

```d
import std;
--- hello.d

void main(){
   "hello".writeln;
}
```

Should have a warning: "line 2 `har` detected, did you mean to 
use a different tool for this?" but then compile ignoring it. 

level of compatibility that would be basically impossible to 
implement
Jul 14
parent user1234 <user1234 12.de> writes:
On Monday, 14 July 2025 at 20:35:13 UTC, monkyyy wrote:
 dlang.io does the `--- foo.d` to mean "the stuff under this is 
 part is foo.d"


 automagicly but the compiler needs to know to ignore it with a 
 fairly lazy hack

 ```d
 import std;
 --- hello.d

 void main(){
   "hello".writeln;
 }
 ```

 Should have a warning: "line 2 `har` detected, did you mean to 
 use a different tool for this?" but then compile ignoring it. 

 level of compatibility that would be basically impossible to 
 implement
And he calls this a DIP... Man you're so sick. this kind of things can go to https://github.com/dlang/dmd/issues.
Jul 16