是否有任何语言允许其变量名称中包含空格

是否有任何语言允许其变量名称中包含空格

本文介绍了是否有任何语言允许其变量名称中包含空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否存在(或曾经存在)任何允许其变量名中包含空格的非平凡语言?

Is there (or was there ever) any non-trivial language that allows spaces in its variable names?

我知道语言空白,但是我对此感兴趣一种除了演示之外实际上还用于其他用途的语言.

I am aware of the language Whitespace, but I'm interested in a language that was actually used for something besides demonstration.

出于好奇,我问这个.

推荐答案

从某种意义上讲,是的.几种语言的变量名实际上只是更高级别对象的键.同时想到Coldfusion和Javascript.在Javascript中,您可以编写foo=bar,但是您真正说的是:

In a way, yes. Several languages's variable names are really just keys to a higher-level object. Both Coldfusion and Javascript come to mind. In Javascript, you can write foo=bar, but what you've really said is:

window['foo'] = bar;

您可以轻松编写

window['i haz a name'] = bar;

Coldfusion中的各种作用域也可以被视为((dict | hash |关联数组)或名称.)

The various scopes in Coldfusion can also be treated as either a (dict|hash|associative array) or a name.

当然,一旦创建了带有空格的名称,不使用哈希查找语法就很难访问它.

Of course, once you've created a name with whitespace, it's harder to access without using the hash lookup syntax.

这篇关于是否有任何语言允许其变量名称中包含空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 12:32