7 Matching Annotations
- Feb 2025
-
www.slingacademy.com www.slingacademy.com
-
function loggable(target: any, propertyKey: string, descriptor: PropertyDescriptor) { let originalMethod = descriptor.value; descriptor.value = function(...args: any[]) { console.log(`Calling ${propertyKey}`); return originalMethod.apply(this, args); }; }
-
- Aug 2021
-
www.martinfowler.com www.martinfowler.com
-
Rubyists don't call these things annotations. One of the things I like doing is to find common techniques that cross languages, for me this is a common technique and 'annotation' seems like a good generic word for it. I don't know if Rubyists will agree.
-
-
www.martinfowler.com www.martinfowler.com
-
Languages may provide annotations in ways that don't reflect the syntax of the language
-
When writing about programming, I prefer to use 'annotation' as the general term. Although .NET was first, the word 'attribute' is just too widely used for different things.
-
An annotation on a program element (commonly a class, method, or field) is a piece of meta-data added to that program element which can be used to embellish that element with extra code.
-
-
- Feb 2021
-
sobolevn.me sobolevn.me
-
Now you can easily spot them! The rule is: if you see a Result it means that this function can throw an exception. And you even know its type in advance.
-