3 ms·
I think the point was that even if you managed to make a O(n*2) parser it will ve fast enough for human entered problems.
by mhast 2mo ago
I think the point was that even if you managed to make a O(n*2) parser it will ve fast enough for human entered problems.
- srean 2mo agoNot for C++ code generated by whole program optimizing compilers. Your "human entered" is doing the heavy lifting. Now that AI is writing code your assertion might be on shaky ground.
- simonask 2mo agoC++ can be slow to compile, but as I said, parsing is not the bottleneck. Even for really huge automatically generated C++ files, or old-school concatenated "unity builds", the parsing step is generally tiny compared to everything else.
- aw1621107 2mo ago> Not for C++ code generated by whole program optimizing compilers. I'd be quite surprised if an optimizing compiler generated C++ code somewhere in its pipeline!
- pjmlp 2mo agoC++26 reflection?
- aw1621107 2mo agoOh, true! That's on me for not being specific enough. I was thinking about the optimization pipeline.
- srean 2mo agoTake a look at Felix. https://felix-lang.github.io/felix/ https://felix-lang.github.io/felix/ Ignore the 'scripting' language claim.
- aw1621107 2mo agoOh, that is certainly not what I was expecting at all. I stand corrected! I do have to wonder though - do you know what proportion of the C++ compiler time is spent parsing your generated C++ code vs. optimizing it?
- srean 2mo agoUnfortunately no. Felix is quite old at this point. It's a very interesting language, with many interesting ideas. It did not quite take off though.
- aw1621107 2mo agoWhat favorite feature(s) do you miss when working in other languages?
- srean 2mo agoCoroutines, cooperative threading using fibres, type classes, generics, type deduction, easy interface with C++. The functional style, pattern matching. Flow based programming using 'chips and wires' abstraction. It has many other interesting capabilities, for example, the ability to change its own grammar, that is rather too much, not for a pleb like me. It has unique (linear and affine) types too. It is really quite a handful. Go did bring coroutines back into limelight but Felix predates Go by a margin. Skaller, Felix's author, used Felix as a playground for novel language design ideas, so it was always in a state of flux.