Email or username:

Password:

Forgot your password?
Top-level
RealGene ☣️

@Mara
I nominate "make" as the keyword for "super let". 'let' is passive, 'make' is active.
The intention to the compiler is clearer, and it certainly reads/scans better.

Using 'super' implies it is a modifier for what follows (à la const in C), which means it would/should be applicable in other circumstances, which would complicate parsing for just the single use case of 'let'…

3 comments
waffle

@RealGene @Mara I don't see how super let would complicate parsing. Rust parser has to do some weird things, but this is not one of them.

The problem with make is that it's not a reserved keyword, so we'd need to introduce a new keyword in an edition, use ugly k# in previous ones and also disallow people from using it for names. A lot of noticeable disadvantages.

Besides IMO it's nice that super is reading as a modifier, it should help teaching "this is like let but with a small twist..."

RealGene ☣️

@wffl @Mara
IANAL but: super is already in use as a keyword/adjective to identify a module parent.

So now the parser must distinguish between 'super let' and 'super::let'.

The behavior described for super let doesn't yet exist anyway, so a new release would be required regardless.

So add 'make' as a super let, or 'durable' or 'perpetual' as a let modifier when you add the functionality…

You want a modifier to at least hint at what it's going to do. Super is kind of vague.

@wffl @Mara
IANAL but: super is already in use as a keyword/adjective to identify a module parent.

So now the parser must distinguish between 'super let' and 'super::let'.

The behavior described for super let doesn't yet exist anyway, so a new release would be required regardless.

So add 'make' as a super let, or 'durable' or 'perpetual' as a let modifier when you add the functionality…

Mara

@RealGene The compiler can look at two words instead of just one, so that's no problem. ^^

`super let` is currently always an error, so nothing breaks if we give it meaning. So we can do that without needing a new edition.

`make` is currently not a keyword and can be used as a regular identifier (e.g. variable or function name), so making that a keyword would break things and thus require an edition.

Go Up