2

私はしばらくの間 Dtrace を使用してきましたが、時間が経つにつれて、Dtrace で使用される D 言語のプログラミング パラダイムは何なのか疑問に思うようになりました。

それは命令型言語ではないので、ある種の宣言型関数型言語であることを意味しますが、私は言語分類の専門家ではないので、D 言語は公式に (または半公式に) 何に分類されるべきでしょうか?

4

2 に答える 2

2

D 言語は、トレースに固有の組み込み (変数、関数) が追加された C のサブセットのようです。これは awk または YACC プログラムの構造と比較できます。1 つ以上の計測ポイント (プローブ、ルール) のリストで構成され、各プローブはアクションに関連付けられています。

私の2セント。

于 2009-04-13T09:01:01.633 に答える
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 :-)

于 2011-01-16T11:29:18.863 に答える