Thoughts about "Compile-time types" talk
NaN
divide at by.zero
Wed May 15 18:31:57 UTC 2019
On Tuesday, 14 May 2019 at 17:44:17 UTC, H. S. Teoh wrote:
> On Mon, May 13, 2019 at 08:35:39AM +0000, Martin Tschierschke
> via Digitalmars-d wrote:
>> On Friday, 10 May 2019 at 00:33:04 UTC, H. S. Teoh wrote: [...]
>> > I haven't fully thought through this yet, but the basic
>> > concept is that there should be *no need* to distinguish
>> > between compile-time and runtime in the general case,
>> > barring a small number of situations where a decision has to
>> > be made.
>> [...]
>> I was thinking and working in the same direction,
>> when using regEx you can use the runtime (RT) or the compile
>> time (CT)
>> version, but why not let the compiler make the decisions?
>
> It would be great if the compiler could make all of the
> decisions, but I think at some point, some level of control
> would be nice or even necessary.
If you envisage a regular if statement being able to be both
CT/RT depending on whether the value inside its brackets is known
at CT or not what do you do about whether it introduces a new
scope or not? Static if does not, but regular if does, if you
want them unified something has to give.
More information about the Digitalmars-d
mailing list