C++ or D?

RSY rsy_881 at gmail.com
Thu Dec 31 07:29:55 UTC 2020


On Thursday, 31 December 2020 at 07:23:17 UTC, RSY wrote:
> C++ you need to write duplicate code (.h and .cpp)
>>
>> C++ you need to care about header include order
>>
>> C++ you need to forward declare everything you gonna use if it 
>> is not included before
>>
>> C++ you need to waste time waiting for compile
>>
>
> Fixed with C++20 modules.
>
>
> ---
>
>
> He said fixed with c++20 modules, when you still have to 
> predeclare everything, as it is was a better solution
>
> LOL, i can't believe it, bad worm


```
export module app;

export int main()
{
     say_hi();
}


void say_hi()
{
     printf("hi\n");
}
```


//  error C3861: 'say_hi': identifier not found

Ohhhh it doesn't compile, it doesn't know what say_hi is, wow 
great c++ module system

Clearly supperior to D /s


More information about the Digitalmars-d-learn mailing list