Should lint suppressions be first class syntax or comments?

Adding a proper metadata system (e.g. Clojure or Rust) is a big design space but it's clear which expressions are affected.

Comments are much easier to implement but it's easy for users to get them wrong.

Thoughts?

Follow

@wilfredh Syntax. Make comments first-class too, while you're at it.

@dpwiz First class comments are pretty darn rare, aren't they? I know some lisps and Python use a plain string for their doc comment, but I've not seen proper first class comments in any language I can think of.

Maybe Smalltalk comes close?

@wilfredh Unfortunately, yes. First teachers make their students shoot themselves in the foot by treating comments as whitespace. Then everyone has to do extra work with crazy grammars to claw the structure back and/or make a formatter.

@wilfredh Maybe Erlang?

-doc """
some markdown inside
""".

I don't know about its rep, but looks pretty first-class.

Python also yes, with the __doc__ attribute you can access AND generate at runtime.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.