4 ms·
Inferring from context.. like many programming languages. Is there a programming language you would say most resembles Japanese in spirit?
by rollypolly 14y ago
Inferring from context.. like many programming languages.
Is there a programming language you would say most resembles Japanese in spirit?
- Danieru 14y agoNo, its more like a unified diff.
- Locke1689 14y agoWhere did you get this idea? Programming languages infer almost nothing from context. Moreover, when they do that's often seen as bad because it usually creates ambiguous semantic or syntactic constructs. Good programming languages are often based off of a formal language[1]. [1] http://en.wikipedia.org/wiki/Formal_language http://en.wikipedia.org/wiki/Formal_language
- corysama 14y agoBasic Japanese always struck me as having special purpose registers and a postfix notation. The basic sentence structure is "noun wa noun da verb." where wa is the "set the subject" operator and da is "set the direct object" operator then stating a verb sets the verb register to complete the statement. Once a register is set, you are able to omit it from later sentences until you want to change its value. "noun wa noun da verb. noun da verb." would indicate that the same subject is doing two different things to two different objects. More operators: http://fm1397.com/knowledge/chalkboard/chalkboard-session-5-wadakano-explained/ http://fm1397.com/knowledge/chalkboard/chalkboard-session-5-...
- evincarofautumn 14y agoIt’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.