难道所有的编程语言有NIL,null或未定义的一个清晰的概念? [英] Do all programming languages have a clear concept of NIL, null, or undefined?

查看:455
本文介绍了难道所有的编程语言有NIL,null或未定义的一个清晰的概念?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写一个键值存储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 :)

请参阅:

<一个href=\"http://stackoverflow.com/questions/2321650/is-this-api-too-simple\">http://stackoverflow.com/questions/2321650/is-this-api-too-simple

有关的键值存储API的讨论

for the discussion about the key-value store API

推荐答案

没有。没有指针所有prodedural语言我能想到的有没有这样的概念。例如,传统的基础(如在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或未定义的一个清晰的概念?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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