lean4 icon indicating copy to clipboard operation
lean4 copied to clipboard

`lake init` should not write imports with French quotes unnecessarily.

Open kim-em opened this issue 1 year ago • 5 comments

lake init foo creates Foo.lean containing import «Foo».Basic, which is quite confusing, and unnecessary.

Could we avoid confusing new users and teaching them unhelpful habits by not using French quotes unless necessary.

kim-em avatar Feb 18 '24 12:02 kim-em

Relatedly, lakefile.lean is populated with unnecessary French quotes in package and lean_lib.

kim-em avatar May 08 '24 02:05 kim-em

@semorrison The French quotes in the imports can probably be removed because Lean does not parse keywords in import statements. In the Lake configuration file, however, it is not possible to know whether the names are keywords. This was the source of a previous bug (lake#128) which was the reason for introducing the French quotes.

tydeu avatar May 08 '24 18:05 tydeu

What is the origin of this impossibility? Can't we just use a fixed blacklist? Or do a "practice run" without the French quotes and check dynamically?

kim-em avatar May 08 '24 23:05 kim-em

@semorrison Lean/Lake does add new keywords as time progresses and those new keywords would then break packages with those names. A possibly better solution (which was part of #3174) is to allow the specification of these names as strings. This way we do not have to worry about keywords at all.

tydeu avatar May 09 '24 15:05 tydeu

Strings sound great.

kim-em avatar May 10 '24 00:05 kim-em