fuzion icon indicating copy to clipboard operation
fuzion copied to clipboard

`prefix` and effects syntax allow very surprising feature signature

Open maxteufel opened this issue 1 year ago • 3 comments

I just stumbled across this, to me, very surprising feature signature: https://github.com/tokiwa-software/fuzion/blob/6f4c10187d130f3f0a049abf22fefa18ab015ae1/bin/ebnf.fz#L32-L35 It took me a moment to realize that this is not a feature named prefix using the effect String (this makes no sense of course), but a feature named prefix ! with the result String.

Should we do anything about this?

maxteufel avatar Aug 20 '24 05:08 maxteufel

this is similar to #3458 where : can cause confusion.

fridis avatar Aug 20 '24 12:08 fridis

This is less of a problem with syntax highlighting: 2024-08-20_14-38

michaellilltokiwa avatar Aug 20 '24 12:08 michaellilltokiwa

I'd argue that screenshot makes it even more confusing because the ! is not colored like the prefix is, but in black. (Yes, this could be fixed with improved syntax highlighting, but still...)

maxteufel avatar Aug 20 '24 12:08 maxteufel