April 29, 2022
On 4/29/2022 11:26 AM, Paulo Pinto wrote:
>> Those were interpreters first and added native code generation later. D did is the other way around, and the native code generating compilers started doing it soon afterwards.
> 
> Decades before D was even an idea.
> 
> Again, SIGPLAN.

So why did other native languages suddenly start doing it after D did to the point of it being something a language can't skip anymore?
April 29, 2022
On Friday, 29 April 2022 at 18:26:46 UTC, Paulo Pinto wrote:
> On Friday, 29 April 2022 at 18:05:42 UTC, Walter Bright wrote:
>> On 4/29/2022 10:00 AM, Paulo Pinto wrote:
>>> On Friday, 29 April 2022 at 15:28:16 UTC, Walter Bright wrote:
>>>> On 4/27/2022 8:59 AM, Satoshi wrote:
>>>>> [...]
>>>>
>>>> Other languages have taken inspiration from D, such as ranges and compile time expression evaluation.
>>>>
>>>> ....
>>> 
>>> Sorry, Lisp, ML, CLU and Smalltalk did it first, D was surely not the first in this regard.
>>> 
>>> Plenty of SIGPLAN papers on the subject.
>>
>> Those were interpreters first and added native code generation later. D did is the other way around, and the native code generating compilers started doing it soon afterwards.
>
> Decades before D was even an idea.
>
> Again, SIGPLAN.

Which papers?
April 29, 2022
On 4/29/2022 12:10 PM, Walter Bright wrote:
> So why did other native languages suddenly start doing it after D did to the point of it being something a language can't skip anymore?

I've seen endless lists of features people wanted to add to C and C++. None of them were CTFE. When we added it to D, people were excited and surprised.
April 30, 2022

On Friday, 29 April 2022 at 20:17:38 UTC, Walter Bright wrote:

>

I've seen endless lists of features people wanted to add to C and C++. None of them were CTFE. When we added it to D, people were excited and surprised.

Not if they had a decent CS background, it is a well known strategy for speeding up programs. Wikipedia also points out a working C++ prototype from 2003, so I doubt they needed outside influence to move in that direction.

April 30, 2022
On Friday, 29 April 2022 at 19:10:32 UTC, Walter Bright wrote:
> On 4/29/2022 11:26 AM, Paulo Pinto wrote:
>>> Those were interpreters first and added native code generation later. D did is the other way around, and the native code generating compilers started doing it soon afterwards.
>> 
>> Decades before D was even an idea.
>> 
>> Again, SIGPLAN.
>
> So why did other native languages suddenly start doing it after D did to the point of it being something a language can't skip anymore?

They didn't, they got inspired by those that preceded D, you just want to believe D was the cause.


April 30, 2022
On Friday, 29 April 2022 at 20:17:38 UTC, Walter Bright wrote:
> On 4/29/2022 12:10 PM, Walter Bright wrote:
>> So why did other native languages suddenly start doing it after D did to the point of it being something a language can't skip anymore?
>
> I've seen endless lists of features people wanted to add to C and C++. None of them were CTFE. When we added it to D, people were excited and surprised.

Only those lacking sound CS background in language research.

April 30, 2022

On Saturday, 30 April 2022 at 06:30:46 UTC, Ola Fosheim Grøstad wrote:

>

On Friday, 29 April 2022 at 20:17:38 UTC, Walter Bright wrote:

>

I've seen endless lists of features people wanted to add to C and C++. None of them were CTFE. When we added it to D, people were excited and surprised.

Not if they had a decent CS background, it is a well known strategy for speeding up programs. Wikipedia also points out a working C++ prototype from 2003, so I doubt they needed outside influence to move in that direction.

Sometimes a good idea from academia needs a practical example (D in this case) to show its usefulness before I sees widespread adoption. That doesn't mean that it was invented by D, or that there is no prior art.

April 30, 2022
On Friday, 29 April 2022 at 20:17:38 UTC, Walter Bright wrote:
> On 4/29/2022 12:10 PM, Walter Bright wrote:
>> So why did other native languages suddenly start doing it after D did to the point of it being something a language can't skip anymore?
>
> I've seen endless lists of features people wanted to add to C and C++. None of them were CTFE. When we added it to D, people were excited and surprised.

Your lists are not representative. When D added it, our reaction was more like "finally, somebody did that!". And even today, the feature is only marginally useful because of the countless forward reference bugs. I recently filed one more (https://issues.dlang.org/show_bug.cgi?id=22981), which is not a CTFE bug per se but was encountered in another futile attempt to generate code with CTFE in a reasonable manner.
April 30, 2022

On Saturday, 30 April 2022 at 07:07:31 UTC, Tobias Pankrath wrote:

>

Sometimes a good idea from academia needs a practical example (D in this case) to show its usefulness before I sees widespread adoption. That doesn't mean that it was invented by D, or that there is no prior art.

Speeding up execution by evaluating functions where the input is known is the first thing you think about when considering optimizations. This practice predates the existance of most CS departments. People even did it without compiler support decades before D came into existance, one common generic strategy was to core dump a program right before it request user input and then turn the core dump into an executable.

Languages like C were designed for limited semantics and fast compilation and essentially relied on the programmer for optimization rather than the compiler, because clever compilers were slow and were costly to develop. C++ tried to turn C into a proper high level language, but ended up triggering bastardized template programming practices that never should have existed, which in turn triggered what D programmers think of as CTFE. So it is more a result of poor C++ practice than cleverness. You have improved on the terrible C++ template practice, but still dont have a solution for compiler performance or debugging.

April 30, 2022

On Saturday, 30 April 2022 at 07:07:31 UTC, Tobias Pankrath wrote:

>

On Saturday, 30 April 2022 at 06:30:46 UTC, Ola Fosheim Grøstad wrote:

>

On Friday, 29 April 2022 at 20:17:38 UTC, Walter Bright wrote:

>

I've seen endless lists of features people wanted to add to C and C++. None of them were CTFE. When we added it to D, people were excited and surprised.

Not if they had a decent CS background, it is a well known strategy for speeding up programs. Wikipedia also points out a working C++ prototype from 2003, so I doubt they needed outside influence to move in that direction.

Sometimes a good idea from academia needs a practical example (D in this case) to show its usefulness before I sees widespread adoption. That doesn't mean that it was invented by D, or that there is no prior art.

Those pratical examples precede D's existence by decades.