Stream: t-compiler

Topic: hiding hacks a la #60118


nikomatsakis (May 02 2019 at 14:33, on Zulip):

I think @Esteban Küber we should not be asking "to write or not to write" but rather "how can we structure the system to make these sorts of hacks elegant"

matklad (May 02 2019 at 14:34, on Zulip):

FWIW, I am trying to extract lexer into the library, and this is hard in part because error reporting is a perfect cement that keeps all the pieces together :-)

nikomatsakis (May 02 2019 at 14:35, on Zulip):

That said, I think that -- looking at this PR -- it does feel like something of a maintenance burden going forward.

nikomatsakis (May 02 2019 at 14:35, on Zulip):

It's the global mutable state that has me scared :)

nikomatsakis (May 02 2019 at 14:35, on Zulip):

(Among other things)

matklad (May 02 2019 at 14:36, on Zulip):

In https://github.com/rust-lang/rust/pull/60261 I've tried to teas apart error-detection and error-reporting logic, this generally seems like a nicer approach for librarification. But probably also less powerful one, as some kinds of errors will be hard to report in this fashion.

Esteban Küber (May 02 2019 at 15:26, on Zulip):

The thing that I find difficult with with these kind of errors, where the recovery would imply keeping around two different parses around and deciding later which one was correct necessitate this kind of spooky action at a distance

Esteban Küber (May 02 2019 at 15:27, on Zulip):

And for the most part the global state is append only :slight_smile:

Esteban Küber (May 02 2019 at 15:28, on Zulip):

@matklad I would say rip diagnostics out and then we can re add them one at a time

Esteban Küber (May 02 2019 at 15:28, on Zulip):

It is a very parallelizable problem that can be fixed by throwing people at it

nikomatsakis (May 02 2019 at 16:37, on Zulip):

And for the most part the global state is append only :slight_smile:

this still affects incremental

Esteban Küber (May 02 2019 at 17:20, on Zulip):

Fair enough

Last update: Nov 16 2019 at 01:55UTC