Nim Nuggets: Nim talk at Strange Loop 2021
Imperatorn
johan_forsberg_86 at hotmail.com
Sun Oct 17 11:14:15 UTC 2021
On Sunday, 17 October 2021 at 10:03:12 UTC, Ola Fosheim Grøstad
wrote:
> On Sunday, 17 October 2021 at 08:20:24 UTC, Imperatorn wrote:
>> And still, in 2021 using C++20, compile time features are
>> severely crippled.
>
> How so? Anyway, what Walter said was not accurate. Languages
> are usually defined in a way where compile-time optimizations
> are optional and an implementation detail. Compile time
> evaluation of functions is nothing new, and a common
> optimization.
>
>> I tried just some days ago doing some simple math pow stuff
>> and the answer I got from the C++ community was "eh, well
>> you'd have to use a constexpr compatible library for that"
>
> Because pow may be system specific at runtime. A compile time
> optimization should not lead to a different outcome.
I'm not sure if you write C++ or not. But if you do a side by
side ct/meta comparison of common things you do in D vs C++, C++
is really behind when it comes to convenience, if it's even
possible.
Well pow was just a random example, but as an example, what would
the C++ version look like?
More information about the Digitalmars-d
mailing list