Ticket #88 (new enhancement)
unified and extensible annotations
| Reported by: | waldmann@… | Owned by: | none |
|---|---|---|---|
| Milestone: | Keywords: | ||
| Cc: | Section: | ||
| State: |
Description (last modified by ijones) (diff)
We have several annotations in current Haskell: deriving, pragmas {-# #-}, {-! !-} ( DrIFT), haddock... These are ad-hoc, and not extensible by the programmer.
There are better ways:
- C-sharp has custom attributes.
- Java (1.5) has annotations.
For me the important features are
- An annotation is allowed basically at any declaration,
- and programmers can define their own annotations,
- and annotations can also have values.
- Also, they have a retention policy saying whether they should be visible at compile time or at run time, where compile time is for tools/preprocessors, and visibility at run time is helpful for reflection. (Would need some support from Data.Generics or thereabouts.)
I have brought this proposal up on the mailing list and there was one response.
Change History
Note: See
TracTickets for help on using
tickets.
