this post was submitted on 19 Nov 2023
52 points (83.3% liked)

Programming

17507 readers
9 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
 

Github: https://github.com/nasser/---

Hello world:

‫(قول "مرحبا يا عالم!")
you are viewing a single comment's thread
view the rest of the comments
[–] BatmanAoD 2 points 1 year ago (1 children)

I'm trying to think of examples of this, and I actually don't know that this is true. Here are the examples I can think of:

  • Arguably object-oriented .method() syntax is similar to "subject-verb" order, but we also have function(self, ...) which is the reverse of that.
  • for foo in bar is used in a few languages (or sometimes foreach). But many languages use a totally non-English construct, such as for i = 0; i < limit; i++ or for (auto foo : bar).

What else is there?

[–] Redkey 2 points 1 year ago* (last edited 1 year ago) (1 children)

Drawing on Japanese, which is the only non-English language I have significant experience with, object.method(parameter) would feel more natural as object.(parameter)method, possibly even replacing the period separator with a Japanese grammatical construct (with no equivalent in English) that really suits this use case. Even the alternative function(self, parameter, ...) would mesh better with natural Japanese grammar as (self、parameter、〜)function. The majority of human languages have sentences which run Subject-Verb-Object, but a handful which includes Japanese run in the order Subject-Object-Verb.

I gave an example of an alternative for...in loop in another comment here, so I won't rehash it here. But following the general flow of Japanese grammar, that for at the beginning of the statement would feel much more natural as a (or "with") at the end of the statement, since particles (somewhat similar to prepositions in English) go after the noun that they indicate, rather than before. And since semicolons don't exist in Japanese either, even they might be replaced with a particle like "".

There aren't any big problems here, but a plethora of little things that can slowly add up.

[–] [email protected] 1 points 1 year ago

Object wa parameter o method desu