跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 程序设计语言

arXiv:2301.10353 (cs)
[提交于 2023年1月24日]

标题:Bridging Swift Error Handling Model to C++

作者:Roberto Rosmaninho
查看论文《Bridging Swift Error Handling Model to C++》的 PDF
查看中文 PDF 查看原文 PDF EasyResearch 阅读
摘要:Error handling is the process of responding to and recovering from error conditions in the program. In Swift, errors are represented by values of types that conform to the Error protocol. Throwing an error lets you indicate that something unexpected happened, and the normal flow of execution can't continue. A throw statement is used to throw an error. Optional returns are used to represent the absence of a value, but when an operation fails, it's often useful to understand what caused the failure so that code can respond accordingly. Therefore, I propose to bridge the Swift Error Handling modeling to C++ to improve the interoperability between the programming languages. The main idea is to be able to throw a C++ exception that stores a thrown Swift Error that has to be represented by a C++ class. In addition to that, to support C++ programs that don't use exceptions, I propose an additional interoperability mode for throwing functions. When C++ exceptions are disabled, C++ functions should return a result value that contains either the value returned by the function or the Swift Error value: the Swift::Exception<T> class.
评论: Final Computing Project Report to the Bachelor Degree in Computer Science of the Universidade Federal de Minas Gerais
主题: 程序设计语言 (cs.PL)
引用方式: arXiv:2301.10353 [cs.PL]
  (或者 arXiv:2301.10353v1 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.2301.10353

提交历史

来自:Roberto Rosmaninho
[v1] 2023年1月24日 星期二 23:44:49 UTC
全文链接:

访问论文:

  • 查看中文 PDF
  • 查看原文 PDF
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.PL
< 上一篇   |   下一篇 >
最新 | 近期 | 2023-01
切换浏览方式为:
cs

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站