- 3 Posts
- 3 Comments
soc@programming.devOPto
Programming@programming.dev•Language Design: Annotations Obsolete ModifiersEnglish
0·9 days agoI spent the necessary effort to experiment/work with the various approaches to form an opinion, and your main counter argument is largely … being sarcastic, trying the hardest to misunderstand things to ridicule them and being generally offended?
Let’s end this here, your comments are a poor use of my time.
soc@programming.devOPto
Programming@programming.dev•Language Design: Annotations Obsolete ModifiersEnglish
01·9 days agoI believe that if you start from an annotation-only stance, then you will look at the language, its defaults and possible extensions differently, because annotations are “visually” more expensive than slapping yet-another keyword on something.
I. e.:
- “no visibility modifier” should probably mean “public”
- defining the external API should move to the module-level altogether
- we should probably use
varinstead oflet mut #[cfg(target_os = "windows")]is just bad design overall
instead put different targets into different folders: much easier, works betterasyncshould not exist at all
(though not related to annotations vs. modifiers, but because the whole idea is a language design dead-end)
So the code from your example would literally be …fun some_func: Unit = { var my_var = 3u2 // ...… in my design.
Rust’s syntax with
#[...]is not that great in this regard, as it triples the amount of symbol involved for simple annotations compared to something using.

Thank you for letting me know your thoughts!
Maybe not “very big”, but I agree with your point in principle.
The reason why I think it is worthwhile (compared to e. g. range syntax) is that we are paying for it anyway already:
Good error reporting hinges on parsing not strictly the language that’s defined, but understanding the language that people actually write – and people forget
;all the time.So from my POV I’m turning an error reporting step (that I’d have to implement anyway) into something more useful.
To be honest, if all the fancy formatting stuff requires a macro, so be it.
I just don’t want to need macros for creating a list and so on.