Is there a human readable programming language? [c

2019-01-29 20:07发布

I mean, is there a coded language with human style coding? For example:

Create an object called MyVar and initialize it to 10;
Take MyVar and call MyMethod() with parameters. . .

I know it's not so useful, but it can be interesting to create such a grammar.

标签: nlp grammar
30条回答
ゆ 、 Hurt°
2楼-- · 2019-01-29 20:30

SQL

SELECT name, address FROM customers WHERE region = 'Europe'
查看更多
放我归山
3楼-- · 2019-01-29 20:33

How about LOLCODE?

HAI
CAN HAS STDIO?
VISIBLE "HAI WORLD!"
KTHXBYE

Simplicity itself!

查看更多
疯言疯语
4楼-- · 2019-01-29 20:33

AppleScript is pretty close to that, though that is obviously platform dependent.

Here's a script for opening iTunes and playing a playlist

tell application "iTunes"
    activate
    play playlist "Party Shuffle"
end tell

Source: AppleScript Examples

查看更多
冷血范
5楼-- · 2019-01-29 20:33

Interesting question. Your question can be read as "Is there any programming language that is easily readable by humans?", OR ELSE as "Is there a human language that can be used for programming?". All the answers here have focused on the former, so let me try answering the latter.

Have you heard of Sanskrit? It is an ancient Indian language on which modern Indian languages like Hindi are based.

wiki/Sanskrit

I've been hearing for years that it is precise and complete enough to be used, as it is, as a high-level language on a computer. Ofcourse, you need a compiler to convert Sanskrit instructions to machine language. I know the script & yes, it is precise (entirely phonetic so you never have to ask "how do you spell that"), but I don't know the grammer well enough.

This is completeley anecdotal, so I don't vouch for the accuracy of this. Just wanted to share what I know regarding this. :-)

查看更多
干净又极端
6楼-- · 2019-01-29 20:34

COBOL was intended to be read by managers, and has "noise words" to make it more readable.

The funny thing is, it reads a bit like a verbose DSL.

查看更多
欢心
7楼-- · 2019-01-29 20:35

Projects promoting programming in "natural language" are intrinsically doomed to fail.

-- Edsger W.Dijkstra, How do we tell truths that might hurt?

查看更多
登录 后发表回答