this post was submitted on 19 Apr 2026
1 points (57.1% liked)

Programming

26579 readers
124 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] soc@programming.dev 1 points 5 hours ago (1 children)

Jesus Christ, calm down. :-)

You do not have to agree with every blog post found on the internet.
I think you make a few good arguments, but you are way too angry for me to engage.

[–] calcopiritus@lemmy.world 1 points 4 hours ago (1 children)

I did not intend to sound angry. I was trying to do an honest review of this article. Since I did not consider it good at all.

[–] soc@programming.dev 1 points 3 hours ago* (last edited 3 hours ago)

Ok, then here's a short answer to your points:

Aesthetics. Annotations are just uglier than modifiers. Due to their special syntax instead of just a naked keyword.

If the language has annotations already, then you have paid the tax of having "special syntax" in your language in any case.
(Except Swift maybe, which has "attributes" and more than 200 keywords.)

Annotations take up more space

I don't consider this a drawback. In fact, many languages with modifiers have the same rules about modifier placement.
I actually want annotations on their own line, such that all my actual keywords start at the same column.

Disorder

Many languages with modifiers have the exact same issue, and address the issue the same way I'd address it for annotations:
Define a desired order of annotations and let the compiler/linter/IDE/formatter deal with it.

Downgrading

Let the IDE/editor pick a different color for you "more important" annotations, if you like.

“your language should not have modifiers, do annotations instead” instead of “if your language has both, remove modifiers”

That's just nitpicking the wording. Ok.

Namespacing ... is not objectively better. I don’t want to import “public” in every single file.

Then don't? Most languages don't make you import String either.

Namespacing ... Or even worse, a non-annotation (function, class) named “public”.

Have a separate namespace for for annotations, or treat @ as part of the name.
Though it's not something I would spend effort on – sometimes the best answer to "X does not work" is "then don't".

Variable declarations do have modifiers too (for example “const” in C).

I replaced ...

const foo: Foo = ...

... with ...

@constantValue
let foo: Foo = ...

... in my language a short while ago. It's fine.