是否有依赖非拉丁字母的编程语言?

发布于 2024-09-02 08:09:52 字数 294 浏览 5 评论 0原文

我见过的每种编程语言都是基于拉丁字母的,考虑到我住在加拿大,这并不奇怪...... 但只有存在基于其他字母表的编程语言才真正有意义,否则世界各地聪明的计算机科学家将不得不学习一种新的字母表才能在该领域继续下去。我知道一个事实,即以其他字母为主的国家的人们开发基于拉丁字母的语言(例如来自日本的 Ruby),但是基于其他字母(例如阿拉伯语或西里尔语)的编程语言是多么普遍,或者甚至是本质上不是字母而是表意的书写系统,例如日语汉字? 这些语言中是否有积极广泛使用的语言,或者它们主要用作教学工具? 自从我开始编程以来,这个问题就一直困扰着我,而且我从未遇到过能想到真正答案的人。

Every programming language I have ever seen has been based on the Latin alphabet, this is not surprising considering I live in Canada...
But it only really makes sense that there would be programming languages based on other alphabets, or else bright computer scientists across the world would have to learn a new alphabet to go on in the field. I know for a fact that people in countries dominated by other alphabets develop languages based off the Latin alphabet (eg. Ruby from Japan), but just how common is it for programming languages to be based off of other alphabets like Arabic, or Cyrillic, or even writing systems which are not alphabetic but rather logographic in nature such as Japanese Kanji?
Also are any of these languages in active widespread use, or are they mainly used as teaching tools?
This is something that has bugged me since I started programming, and I have never run across someone who could think of a real answer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

£烟消云散 2024-09-09 08:09:53

你见过珀尔吗?

Have you seen Perl?

ゃ人海孤独症 2024-09-09 08:09:53

APL 可能是最广为人知的。它甚至有一个很酷的键盘覆盖层(或者是您必须购买的特殊键盘?):

图片由维基百科提供

在非字母类别中,我们还有诸如 LabVIEW,主要是图形化的。 (您可以标记对象,并且仍然可以进行字符串操作,因此有一些文本内容。)LabVIEW 已在数据采集和自动化领域使用多年,但当它成为Lego Mindstorms 的默认平台。

APL is probably the most widely known. It even has a cool keyboard overlay (or was it a special keyboard you had to buy?):

image courtesy of Wikipedia

In the non-alphabetic category, we also have programming languages like LabVIEW, which is mostly graphical. (You can label objects, and you can still do string manipulation, so there's some textual content.) LabVIEW has been used in data acquisition and automation for years, but gained a bit of popularity when it became the default platform for Lego Mindstorms.

自找没趣 2024-09-09 08:09:53

维基百科上有一个列表。但我认为它们中的任何一个都不是真正流行的。许多程序员即使不懂该语言,也可以学会用英语关键字编写程序。 Ruby 是一个很好的例子,您仍然会在一些 Ruby 代码中看到日语标识符和注释。

There's a list on Wikipedia. I don't think any of them is really prevalent though. Many programmers can learn to write programs with english keywords even if they didn't understand the language. Ruby is a good example, you'll still see Japanese identifiers and comments in some Ruby code.

稚气少女 2024-09-09 08:09:53

好吧,Brainf* 不使用拉丁字符,请原谅这种语言……而且双关语。

Well, Brainf* uses no latin characters, if you'll pardon the language...and the pun.

緦唸λ蓇 2024-09-09 08:09:53

许多语言都允许 Unicode 标识符。它是标准 Java 的一部分,并且都是g++ (尽管你必须使用 \uNNNN 转义)和 MSVC++ 允许它们(另请参阅 这个问题)有些允许使用#define(或者可能更好)来重命名控制结构。

但实际上,人们大多数情况下不会这样做。查看过去的问题,例如变量名称的语言?、< a href="https://stackoverflow.com/questions/1425097/should-all-code-be-writing-in-english">所有代码都应该用英语编写吗?等。

Many languages allow Unicode identifiers. It's part of standard Java, and both g++ (though you have to use \uNNNN escapes) and MSVC++ allow them (see also this question) And some allow using #define (or maybe better) to rename control structures.

But in reality, people don't do this for the most part. See past questions such as Language of variable names?, Should all code be written in English?, etc.

述情 2024-09-09 08:09:53

Agda

示例片段:

mutual
   data ωChain : Set where
     _∷_,_ : ∀ (x : carrier) (xω : ∞ ωChain) (p : x ≼ xω) → ωChain

   head : ωChain → carrier
   head (x ∷ _ , _) = x

   _≼_ : carrier → ∞ ωChain → Set
   x ≼ xω = x ≤ head (♭ xω)

Agda.

Sample Snippet:

mutual
   data ωChain : Set where
     _∷_,_ : ∀ (x : carrier) (xω : ∞ ωChain) (p : x ≼ xω) → ωChain

   head : ωChain → carrier
   head (x ∷ _ , _) = x

   _≼_ : carrier → ∞ ωChain → Set
   x ≼ xω = x ≤ head (♭ xω)
风柔一江水 2024-09-09 08:09:53

嗯,总有 APL。它有自己的 UNICODE 字符,我相信它过去也需要特殊的键盘。

Well, there's always APL. That has its own UNICODE characters, and I believe it used to require a special keyboard too.

等待圉鍢 2024-09-09 08:09:53

俄罗斯 ERP 系统中使用了一种名为 after 公司的语言,它是由该公司开发的1C。但它的标识符和运算符有英语类似物。

另外,我知道 haskell 有 unicode 标识符支持,所以你可以用任何字母编写程序。但这没有用(我的母语是俄语)。您只需用本地字母输入程序消息和有用的注释就足够了。

There'is one langauge used in russian ERP system called after company, which developed it 1C. But it's identifiers and operators has english analogs.

Also, I know that haskell has unicode identifiers support, so you can write programs in any alphabet. But this is not useful (My native language is russian). It's quite enough that you have to type program messages and helpful comments in native alphabet.

零度℉ 2024-09-09 08:09:53

其他人则使用除拉丁字母外还使用标点符号的语言进行回答。我想知道为什么没有人也提到数字 0 到 9。

在某些语言中,以及在某些语言的某些实现中,程序员可以在标识符中使用多种字符,例如阿拉伯字符或中文字符。但这并不意味着该语言依赖于它们。

在大多数语言中,程序员可以在字符串文字(引号中)和注释中使用各种字符。同样,这并不意味着该语言依赖于它们。

在我见过的每种编程语言中,该语言确实依赖于标点符号和数字。所以这回答了你的问题,但不是以你期望的方式。

现在让我们尝试寻找一些有意义的事情。是否有一种编程语言从非拉丁字母中选择关键字?我猜不会,除了笑话语言。发明一种让某些程序员甚至无法输入程序的编程语言有什么意义呢?

编辑:我的猜测是错误的。除了 APL 使用各种发明的标点符号之外,它确实依赖于一些希腊关键字,其中每个关键字都是一个字母长,例如字母 rho。

Other people are answering with languages that use punctuation marks in addition to Latin letters. I wonder why no one mentioned digits 0 to 9 as well.

In some languages, and in some implementations of some languages, programmers can use a wide range of characters in identifiers, such as Arabic or Chinese characters. This doesn't mean that the language relies on them though.

In most languages, programmers can use a wide range of characters in string literals (in quotation marks) and in comments. Again this doesn't mean that the language relies on them.

In every programming language that I've seen, the language does rely on punctuation marks and digits. So this answers your question but not in the way you expect.

Now let's try to find something meaningful. Is there a programming language where keywords are chosen from non-Latin alphabets? I would guess not, except maybe for joke languages. What would be the point of inventing a programming language that makes it impossible for some programmers to even input a program?

EDIT: My guess is wrong. Besides APL's usage of various invented punctuation marks, it does depend on a few Greek keywords, where each keyword is one letter long, such as the letter rho.

第七度阳光i 2024-09-09 08:09:53

One still widely used example I know is Cyrillic 1C https://github.com/EvilBeaver/OneScript . Many Russian speaking enterprises have business processes which rely on it daily.

There are many other languages based on Cyrillic (and Russian language) which are much less popular https://xn--80ac3cm.xn--p1ai/wiki/%D0%AF%D0%B7%D1%8B%D0%BA%D0%B8_%D0%BF%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D1%8F_%D1%81_%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%BC_%D1%81%D0%B8%D0%BD%D1%82%D0%B0%D0%BA%D1%81%D0%B8%D1%81%D0%BE%D0%BC

念﹏祤嫣 2024-09-09 08:09:53

我刚刚发现了一个有趣的wiki,内容为“深奥的编程语言"。

I just found an interesting wiki for "esoteric programming languages".

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文