Rust 035 手続き的マクロ - トークンを書くRust episode artwork

EPISODE · May 24, 2026 · 14 MIN

Rust 035 手続き的マクロ - トークンを書くRust

from 聞き流しプログラミング言語学習 · host ますたーさん

第35章へようこそ。今日のテーマは「手続き的マクロ」です。これまでの3章で扱ってきたのは宣言的マクロでした。macro_rules!の宣言で、パターンと展開の組をルールとして並べる。入力のトークンがパターンに照らされ、対応する展開が呼び出し位置に差し込まれる。宣言的マクロには表現の限界があります。パターンと展開の対応で書ける範囲を超えた変換、たとえば構造体のフィールド名を文字列として取り出して別のコードに埋め込む、こうした処理は宣言的の枠を超える。これを扱うために用意されているのが、今日扱う手続き的マクロです。今日扱うのは、宣言的マクロの限界、手続き的マクロが解く問題、3つの形態、トークンストリームという界面、synとquoteによる分業、そして別クレートとしてコンパイルされる構造的な理由です。

Episode metadata supplied by the publisher feed · Published May 24, 2026

Embed this episode

NOW PLAYING

Rust 035 手続き的マクロ - トークンを書くRust

0:00 14:30

No transcript for this episode yet

We transcribe on demand. Request one and we'll notify you when it's ready — usually under 10 minutes.

No similar episodes found.

No similar podcasts found.

Frequently Asked Questions

How long is this episode of 聞き流しプログラミング言語学習?

This episode is 14 minutes long.

When was this 聞き流しプログラミング言語学習 episode published?

This episode was published on May 24, 2026.

Can I download this 聞き流しプログラミング言語学習 episode?

Yes. Use the download control on the episode player to save the publisher-provided media file.
URL copied to clipboard!