2

I've been using Dtrace for a while, and as time goes by I've began to wonder what's the programming paradigm of the D language used in Dtrace.

It's not an imperative language, I guess, so that means it's some sort of declarative functional language, but I'm no expert in language taxonomy, so what should the D language officially (or semi-officially) be classified as?

Robert Gould
  • 68,773
  • 61
  • 187
  • 272

2 Answers2

2

The D language seems to be a subset of C with added builtins (variables, functions) specific to tracing. It can be compared to awk or YACC programs in structure: it consist of a list of one or more instrumentation points (probes, rules), and each probe is associated with an action.

My 2 cents.

dfa
  • 114,442
  • 31
  • 189
  • 228
0

Dtrace is obviously related to aspect-oriented programming, in that it somehow weaves its probes into the programs under study.

I would say that the specification of the weaving points belongs to the declarative programming world, while the probes themselves are programmed imperatively (C-like). Not sure is this answers your question though :-)

Gyom
  • 3,773
  • 5
  • 29
  • 38