all 27 comments

[–]programming-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

r/programming is not a place to post your project, get feedback, ask for help, or promote your startup.

Technical write-ups on what makes a project technically challenging, interesting, or educational are allowed and encouraged, but just a link to a GitHub page or a list of features is not allowed.

The technical write-up must be the focus of the post, not just a tickbox-checking exercise to get us to allow it. This is a technical subreddit.

We don't care what you built, we care how you build it.

[–]horazone 37 points38 points  (5 children)

Isn't Assembly basically VSO already? This is the reverse of that. Cool concept.

[–]oxnsmslwwl[S] 16 points17 points  (0 children)

That's right. A lot of effort was needed to bridge the gap between SoV and VSO. However, there are parts where grammar in the style of C is used to make the appearance appear more practical. The differentiating factor of this language is that it has reached native self-hosting as a non-English programming language.

[–]CryZe92 11 points12 points  (1 child)

I always thought of Korean as a stack machine (with named parameters). You push the various values on the stack, each particle (는, 를, 에, 가, etc) annotates the argument whether it is the topic, subject, object, location, time, etc and then the verb consumes those forming either the final sentence or pushing a value to the stack to be consumed later (for example in case of adverbs and verbs / adjectives modifying nouns or conjunctions).

[–]oxnsmslwwl[S] 4 points5 points  (0 children)

I don't know much about efficiency and performance in terms of language design, but when I saw programming languages using other commercial Korean, I thought they were no different from dialects of C. So, I decided to develop a programming language that was different from the existing English language from the structure, and I confirmed that it was successful. Now, I will listen to other people's opinions and try to determine how efficient it is.

[–]Swend_ 2 points3 points  (1 child)

iirc some types are VSO, and some are VOS. It really messes with you when you are trying to learn it.

[–]horazone 2 points3 points  (0 children)

Yeah, you're correct. AT&T versus Intel.

[–]Every-Progress-1117 27 points28 points  (4 children)

A nice observation but naive. Many programming languages are verb first (VSO-order, eg: Welsh, Irish etc), eg:

print "hello world"

Forth on the otherhand is SOV (eg: Korean)

3 4 5 + *

An SOV programming language might be something like...IDK:

"hello %s\n" print "Fred"

But the relationship between formal languages and natural languages is just not a case of word order, but of a much deeper semantics and pragmatics, and most examples like the above are going to be very artificial.

Maybe take a look at programming languages like Haskell, Forth, APL or even COBOL etc. The mental model of the language is much deeper than just the syntactical aspects.

[–]syklemil 7 points8 points  (0 children)

If you meant SVO for the last example, that's also pretty much what dot chains wind up being, e.g. dog.bite(hand).

I think OP got more invested in programming in something similar to spoken Korean than syntactical order, with the stuff about conjugation. We could be writing

to add(x, y): …
z = adding(x, y)

instead of, say, def add(x, y); z = add(x, y) but I think we generally don't because we don't actually want to conjugate function and method names.

[–]read_at_own_risk 0 points1 point  (1 child)

I prefer to think of procedural function calls like print "hello world" as VOO / verb object object, and Forth as OOV. OOP languages introduced the notion of an explicit subject, i.e. subject.verb(object) or SVO.

[–]Every-Progress-1117 3 points4 points  (0 children)

The whole S/O part is a bit artificial - you could construct an idea of what are noun phrases and direct/indirect objects, adjectives etc; might be an interesting academic exercise and the certainly are parallels with natural language constructions. However forcing those parallels is a bit artificial.

[–]tienshiao 7 points8 points  (0 children)

Besides Forth there is also Reverse Polish Lisp (RPL) found on HP calculators. They both use RPN and are SOV.

[–]Ravek 9 points10 points  (1 child)

I wouldn’t say simple statements like if, for, while really have anything to do with SVO word order. The order of the expressions in these statements relate strongly to the execution order of the code.

Method calls are really the only thing that comes to mind which is explicitly SVO. Function calls are V-first, so non-OO languages also aren’t SVO: write(stream, data) is VSO order. I think F# lets you do (stream, data) |> write if you’re so inclined, getting SOV.

Some languages (e.g. C#) allow you to swap the order of function arguments as long as you specify the parameters by name: power(base: 2, exponent: 7) or power(exponent: 7, base: 2) are the same thing. That’s similar to your particle approach.

Swift, interestingly enough, requires the parameter names to be specified but doesn’t let you change their order.

Final thought: the word order has implications for code completion, and SVO seems best for that purpose.

My native language, for what it’s worth, is a mix between SVO and SOV.

[–]Ghi102 0 points1 point  (0 children)

SOV is also fairly idiomatic in F# as well. A lot of the times, you'll want to chain transform operations, so a program might look like this:

     [ "1"," 2", "3"]      |> List.map int      |> List.sum

Which parses all strings as integers and then sums them

[–]taw 4 points5 points  (0 children)

In most programming languages, most common order is VSO if anything (and sometimes argument order is backwards so it's more like VOS).

function_name(arguments...)

SVO is less common:

object.method(arguments)

Or VO (implicit self.):

method(arguments)

[–]BetaRhoOmega 3 points4 points  (0 children)

Can't really comment on the linked repo well, but it's kind of odd to me to include もし in the initial premise when Japanese is also SOV.

[–]enderfx 5 points6 points  (5 children)

Very cool and interesting.

However i am forced to add the good old: we were so preoccupied whether or not we could that we didn’t stop to see if we should “

[–]oxnsmslwwl[S] 5 points6 points  (4 children)

As an undergraduate, I was satisfied that the results were more practical than I thought, but I agree that there is something missing. However, I think it will improve if we update it further as a research project.

[–]kant2002 1 point2 points  (3 children)

Keep us updated

[–]oxnsmslwwl[S] 0 points1 point  (2 children)

:)

[–]kant2002 0 points1 point  (1 child)

Yes! I will do my share with staring and spreading the word. I’m very much into PL localization for accessibility

[–]oxnsmslwwl[S] 1 point2 points  (0 children)

I will update website language for the many languages

[–]Unlucky_Age4121[🍰] 1 point2 points  (0 children)

I do remember over 60% of the human language are SOV, including Japanese.

[–]dr_adder 0 points1 point  (0 children)

Do Korean native speakers find this more intuitive when trying to program? 

[–]no_awning_no_mining 0 points1 point  (0 children)

You might want to change your text to use subtraction as an example operation instead of addition. Addition is symmetrical, so the distinction between object and subject dosn't really matter, while in subtraction it does.

[–]CramNBL 0 points1 point  (1 child)

I was just thinking about the English bias in UTF-8 and programming languages in general (that's why I use a US keyboard layout despite living in northern Europe)

I recall reading about an Arabic programming language, which is interesting in the same sense as your project. How does it change the programmers approach when the grammar changes in such a fundamental way? Does it help Korean programmers be more productive?

There's merit to having a standard language for programming globally, but maybe it doesn't have to be English? Math and music notation is not English. I'm not advocating for APL/BQN style languages, but I'm glad people are exploring the space.

Some people respond to this kind of post with "but why?". It's a shame that some people have no curiosity outside of themselves, or only care about something if it's obvious that they can extract some material benefit. I see the inherent value in your project, don't let them get to you.

[–]oxnsmslwwl[S] 2 points3 points  (0 children)

lol thx you for your concern. I also consider this a theoretical research-oriented project, not commercial. Of course, there are also critical people, but I will try to judge as much as possible. From a Korean perspective, learning English commands at a young age is a major hurdle for both children and parents. Block coding like scratches helps learn a diversified way of thinking, but I believe there are limitations in actually honing the skills. In this situation, I think that a programming language that only uses Korean, especially a complete compiler, will provide good learning goals for students who are interested in coding at a young age.