<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>kubo39</author_name>
  <author_url>https://blog.hatena.ne.jp/kubo39/</author_url>
  <blog_title>kubo39's blog</blog_title>
  <blog_url>https://kubo39.hatenablog.com/</blog_url>
  <categories>
    <anon>D言語</anon>
  </categories>
  <description>D言語にはfunctionとdelegateというよく似た使い方をするものがあります。 functionはただの関数ポインタ(Cとだいたい同じもの)ですが、delegateはclosureに対する参照も保持してるので必要となるメモリ量が2倍になります。 import std.stdio; void func_for(void function() f) { writeln(f.sizeof); } void delegate_for(void delegate() d) { writeln(d.sizeof); } void func() { // empty. } void main() {…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fkubo39.hatenablog.com%2Fentry%2F2015%2F04%2F21%2F233338&quot; title=&quot;functionとdelegate - kubo39&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2015-04-21 23:33:38</published>
  <title>functionとdelegate</title>
  <type>rich</type>
  <url>https://kubo39.hatenablog.com/entry/2015/04/21/233338</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
