<https://kotlinlang.org/docs/classes.html> is you...
# getting-started
a
https://kotlinlang.org/docs/classes.html is you says annotation equal to
@Inject
? is you says annotation equal to Decorator (another tech word)? why not use Decorator word?
r
> is you says annotation equal to
@Inject
? > I'm not 100% sure what you're asking, but I'm this example
@Inject
is an annotation on the `Customer`'s constructor. > is you says annotation equal to Decorator (another tech word)? > I guess that depends on what you mean by decorator. That word is used different ways in different languages. > why not use Decorator word? > Why should they use decorator? What's wrong with annotation?
a
is it equal to Typescript Decorator ?
r
There's some overlap, but they're not the exact same. Typescript decorators have some meta programming capabilities, whereas annotations are just meta data. (Those annotations can be used in meta programming and code generation, but that is handled in some sort of annotation processor, and not in the annotation itself.)
j
The meaning of @Inject is not important for these docs. They could have chosen @Foo
g
It's just an example, and it uses popular javax.inject.Inject annotation, because it's one of more whide-spreaded examples of annotations used by man JSR-330 compatible dependency injection frameworks, but in this case, yes, any annotation can work, this one just real-life example