2 ms·
It’s not nearly that simple, formal, or programmatic. First, は wa is a topic marker, not a subject marker; the topic need not be the grammatical subject of a s
by evincarofautumn 15y ago
It’s not nearly that simple, formal, or programmatic.
First, は wa is a topic marker, not a subject marker; the topic need not be the grammatical subject of a sentence, and indeed is often included for emphasis alone. There is a subject marker が ga, but it’s primarily used to introduce new information (“ペンがある。” pen ga aru “There is a pen.”) without changing the topic. だ da or the formal です desu is known as a copula, standing for an assumed verb. This is often is, but not always (“飲み物は?ソーダです。” nomimono wa? sooda desu “What would you like to drink? I’ll have a soda.”). だ is not a direct object marker—you might be thinking of を wo.
Of course, it’s a perfectly reasonable idea to borrow topic-structured statements for a programming language. Just assume the topic wherever a required term is missing:
= new Window
.width = 640
.height = 480
w =
= new Button
.label = "Hello"
.align = CENTER
w.add()
It comes with a host of problems, but it’s reasonable. And you might want to have a look at Forth-family languages if you’re into postfix notation and pointfree/tacit programming.