命名:BEGIN ~ END 与 LIVE ~ EVIL 块结构语言

发布于 2024-08-02 17:42:19 字数 2003 浏览 6 评论 0原文

大括号语言是众所周知的:(wikipedia

其他编程语言可以有 BEGIN ~ END 与 LIVE ~ 邪恶的块结构。例如

A) BEGIN ~ END、DO ~ END、IF ~ END IF - 示例: Ada模块Pascal >、PL/IRuby 等等...

B) IF ~ FI, DO ~ OD, CASE ~ IN ~ OUT ~ ESAC - 示例: 行动!ALGOL 68伯恩 shellELLA, 守卫指挥部 语言LucidOpal, 玛丽多语言Promela 等...

区分两种不同风格 A) 和 A) 的官方(或其他合理)名称是什么? B) 块结构 ?

Curly Bracket languages are well known: (wikipedia)

Other programming languages can have BEGIN ~ END vs LIVE ~ EVIL block structuring. eg

A) BEGIN ~ END, DO ~ END, IF ~ END IF - examples:
Ada, Modula, Pascal, PL/I, Ruby
etc...

B) IF ~ FI, DO ~ OD, CASE ~ IN ~ OUT ~ ESAC -
examples: Action!, ALGOL 68, Bourne
shell
, Cool, ELLA, Guarded Command
Language
, Lucid, Opal, Maple, Mary,
Polyglot, Promela etc...

What are the official (or-else reasonable) names to differentiate the between the two different styles A) & B) of block structuring ?

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

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

发布评论

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

评论(4

如若梦似彩虹 2024-08-09 17:42:19

http://en.wikipedia.org/wiki/Curly_bracket_programming_language

FTA:

大括号或方括号编程语言是那些使用平衡括号({ 和 })(也称为“波浪括号”、“大括号”或简称“大括号”)在其语法或形式语法中构成块的语言,主要是由于受到C的影响。主要的替代风格是使用成对关键字,尽管某些语言(特别是 Python 和 Occam)使用越位风格,而 Lisp 使用括号。

我从中得到的意思是:
{} = 大括号编程语言
BEGIN END = 配对关键字
缩进 = 越位

并不是说​​维基百科是权威的,但它似乎与您所得到的最接近“官方”名称,并且如果您这样引用它们,大多数人可能会立即知道您在说什么。

http://en.wikipedia.org/wiki/Curly_bracket_programming_language

FTA:

Curly brace or bracket programming languages are those which use balanced brackets ({ and }), also known as "squiggly brackets", "brace brackets" or simply "braces") to make blocks in their syntax or formal grammar, mainly due to being C-influenced. The main alternate style is the use of paired keywords, although some languages (notably Python and Occam) instead use an off-side style, and Lisp uses parentheses.

I take from that as meaning:
{} = curly bracket programming languages
BEGIN END = paired keyword
indentation = off-side

Not to say that Wikipedia is definitive, but it seems as close to "official" names as you will get, and most people would probably immediately know what you are talking about if you refer to them as such.

§对你不离不弃 2024-08-09 17:42:19

我担心这个答案可能会让人不满意。我只听说过花括号编程语言非花括号编程语言:)

I fear that answer may be dissatisfying. Only names I heard of were Curly bracket programming languages and Non-curly-bracket programming languages :)

橘寄 2024-08-09 17:42:19

Algol 实际上以 if - then - begin - end 语法开始,然后转到 if > - then - fi 语法,因此最好避免调用任何“类似 Algol”的内容。如果您将 begin - end 风格称为“类似 Pascal”的括号,并将 if - < code>fi 风格“sh-like”包围。

Algol actually started with if - then - begin - end syntax before moving to if - then - fi syntax, so it's probably best to avoid calling anything "Algol-like". A lot of people would probably get your drift if you called the begin - end style "Pascal-like" bracketing, and the if - fi style "sh-like" bracketing.

翻了热茶 2024-08-09 17:42:19

作为“反转”的双关语,我建议:IF ~ FI、DO ~ OD、CASE ~ IN ~ OUT ~ ESAC 作为“虔诚”的块结构。

第一个“虔诚”块结构的情况可以在 http://ALGOL 公告 - ISSN: 0084-6198,但是我找不到发起者姓名或确切的帖子。

因此,BEGIN ~ END、DO ~ END、IF ~ END IF 也是“不敬的”块结构。

出现得更早(并且在计算之外)的技术回文的示例是开尔文勋爵的 Mho (℧)

As a pun on "reversed" I suggest: IF ~ FI, DO ~ OD, CASE ~ IN ~ OUT ~ ESAC as "reverent" block structuring.

The first case of "reverent" block structuring might be found in http://ALGOL Bulletin - ISSN: 0084-6198, however I cannot find the originators name or an exact posting.

Hence also: BEGIN ~ END, DO ~ END, IF ~ END IF as "irreverent" block structuring.

An example of a technical palindrome that appears much earlier (and outside of computing) would be Lord Kelvin's Mho (℧).

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