Why is D unpopular?

max haughton maxhaton at gmail.com
Wed May 4 06:29:55 UTC 2022


On Wednesday, 4 May 2022 at 05:54:42 UTC, Max Samukha wrote:
> On Tuesday, 3 May 2022 at 19:01:44 UTC, Walter Bright wrote:
>
>>
>> I'm surprised C# can't do CTFE. I guess its creators never 
>> thought of it :-)
>
> Nemerle creators did (obviously inspired by LISPs and MLs).
>
>>
>> Java can create and compile code at runtime. I ran into this 
>> when creating a Java native compiler for Symantec. It was used 
>> very rarely, but just enough to sink the notion of a native 
>> compiler.
>
> The important part is that Nemerle can execute functions at 
> compile time - whether it's done via interpretation or 
> compilation is not relevant to the argument. D could as well 
> compile CTFE into native code or IL (as in newCTFE) from the 
> start.
>
> Also, one could argue that native code is not native code, 
> because it is further translated by the CPU into microcode, 
> hence the CPU is an interpreter, hence any native compiler is 
> not native. We'd rather accept that IL is native code to the VM 
> and move on.

Native code is indeed not *exactly* native code however calling a 
CPU an interpreter is either false or requires such a loose 
definition of interpreter that it loses most of its descriptive 
power. Basically all CPUs translate an ISA into some kind of 
internal state, big processors just happen to have an extra layer.

Also, I suppose this is mostly nomenclature, the instructions are 
translated into micro-operations/uops whereas microcode as a term 
is usually reserved for either extremely complex instructions or 
configuring CPU features, otherwise you have the term microcode 
referring to the same thing it always has versus an innovation 
Intel made with the early Pentiums (pentia?)



More information about the Digitalmars-d mailing list