什么是“thunk”? [英] What is a 'thunk'?

查看:163
本文介绍了什么是“thunk”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看到它用于编程(特别是在C ++域),不知道它是什么。大概是一个设计模式,但我可能是错的。

I've seen it used in programming (specifically in the C++ domain) and have no idea what it is. Presumably it is a design pattern, but I could be wrong. Can anyone give a good example of a thunk?

推荐答案

词thunk在计算机科学中至少有三个相关含义。 thunk可以是:

The word thunk has at least three related meanings in computer science. A "thunk" may be:


  • 一段代码来执行延迟的
    计算(类似于闭包) li>
  • 某些虚拟函数
    表实现的功能(类似于
    包装器函数)


  • 系统特定的表单到另一个,
    通常为了兼容性原因

我通常看到它用于

http://en.wikipedia.org/wiki/ Thunk

这篇关于什么是“thunk”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆