Is AliasAssign Now Official?
max haughton
maxhaton at gmail.com
Thu Aug 19 21:01:14 UTC 2021
On Thursday, 19 August 2021 at 20:40:30 UTC, Alexandru Ermicioi
wrote:
> On Thursday, 19 August 2021 at 20:16:19 UTC, Basile B. wrote:
>> I suspect that this feature nobody cares about was motivated by
>> the newCTFE failure, which has caused a serious trusting issue
>> in Stefan work.
>>
>> I cannot be more honnest. This is really what I think.
>
> Tbh, the target of making a vm for compile time code was too
> high of a jump, hence epic crash. Before even attempting to do
> a vm for the compile time code, the compiler itself should've
> been in right state to be able to reuse existing components.
>
> The target for new ctfe should've been something less
> grandiose, than full blown vm, and backend for it.
>
> I really, anticipated that feature, since aedi (dependency
> injection lib) I've written relies on heavy template recursion
> and hence high compile time, and got really disappointed when
> nothing really came out of all advertising I've been seeing
> that time, really it should've been kept quiet, or as concise
> as possible instead of being loud all over forums.
>
> R.I.P. (as far as I know) new ctfe on fancy vm.
>
> Regards,
> Alexandru.
What other alternative is there? The existing interpreter is
fundamentally slow, but there aren't many alternatives to roughly
what Stefan was trying to do.
The issue is that parts of dmd are written with absolutely no
concept of a big picture whatsoever and dependency resolution is
done like a chimp let loose in an operating theatre. Writing
something like newCTFE should not be that hard (You can write a
bytecode interpreter in literally half a day, and translate an
AST to that byte in another day - a week if you want test
coverage), but as far as I can tell you end up with horrific
problems because the "interpreter" is not an interpreter as per
se but rather a glorified constant-folding step - i.e. things are
still being resolved as the folding (all this wrapped in an awful
interface, too! e.g. `null` can mean all kinds of things inside
dmd - like not resolved, couldn't resolve, not present, haven't
tried yet etc. in the same place) so what should be a simple task
ends up going from balancing a stick to balancing an n-pendulum
on your nose.
https://youtu.be/cyN-CRNrb3E
newCTFE also isn't dead, as far as I know it's blocked on
something like exceptions - although I wouldn't call it exactly
alive either. Some of that is Stefan's fault, some it is just
fundamental to the problem. As for Stefan personally, he does get
distracted and he should be much more complete in documenting
what he is up to, but equally who else is doing anything else
even remotely interesting? Since 2017 we've gained, what, static
foreach? Innovation is hard, the state of our existing stuff
isn't helping.
Simple guideline for future big (>10 commits) projects for D:
They *must* be developed either in an official fork or in a
branch in an official project, otherwise they'll wither and die
without being seen by enough eyes.
More information about the Digitalmars-d
mailing list