7 Matching Annotations
  1. Feb 2025
    1. 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); }; }
  2. Aug 2021
    1. 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.
    1. Languages may provide annotations in ways that don't reflect the syntax of the language
    2. 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.
    3. 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.
  3. Feb 2021