Decorators, Annotations, Macros, AST transforms…

Russel Winder russel at winder.org.uk
Tue Feb 4 02:52:22 PST 2014


…choose you favourite term.

Following on from trying to use D to write CPython extensions without
using PyD: entry points will be functions:

extern(C) type name() {
  initializeIfNoAlreadyDone();
  …
}

This immediately looks like a job for a Python decorator.

@pythonentry type name() {
  …
}

>From searching the Web there is DIP6 and DIP50, but what is the current
official way of doing this source to source transform in D just now.

Thanks.

-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder at ekiga.net
41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel at winder.org.uk
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



More information about the Digitalmars-d-learn mailing list