所有的编程语言都对 NIL、null 或 undefined 有明确的概念吗? [英] Do all programming languages have a clear concept of NIL, null, or undefined?

查看:47
本文介绍了所有的编程语言都对 NIL、null 或 undefined 有明确的概念吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用许多不同的语言编写一个键值存储 API(如 ODBC,只是接口,而不是底层存储),虽然我不想在语言之间音译 API,但我不想例如存储一个Java 中的值作为空",然后用另一种不支持空概念的语言读取它.我不确定我是否解释得这么好,但这是我的第一次尝试:)

I am writing a key value store API (like ODBC, just the interface, not the underlying store) in many different languages and while I do not want to transliterate the API between languages, I do not want for example to store a value from Java as a "null" and then read it in another language which does not support a concept of null. I'm not sure if I am explaining this so well, but its my first try :)

见:

这个 API 是不是太简单了?

关于key-value store API的讨论

for the discussion about the key-value store API

推荐答案

没有.我能想到的所有没有指针的程序化语言都没有这样的概念.例如,经典的 Basic(如 80 年代家用电脑中使用的那种)就没有这样的概念.我认为 Cobol 也没有.

No. All prodedural languages without pointers I can think of have no such concept. For example, classical Basic (like the one used in 80s' home computers) has no such concept. I don't think that Cobol has it, either.

这篇关于所有的编程语言都对 NIL、null 或 undefined 有明确的概念吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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