Hacker News new | ask | show | jobs
The Wa Programming Language (github.com)
52 points by chai2010 1318 days ago
8 comments

Wa is a general-purpose programming language designed for developing robustness and maintainability WebAssembly software. Instead of requiring complex toolchains to set up, you can simply go install it - or run it in a browser.

- Home: https://wa-lang.org - Github: https://github.com/wa-lang/wa - Playground: https://wa-lang.org/playground/

from https://wa-lang.org/

> 自主可控、纯中文国内社区

> Independent and controllable, pure Chinese domestic community

Doing software projects for domestic and foreign users is extra work, and the community seems to fragment along language lines. For example: https://www.esp32.com/index.php

I guess a 纯中文国内社区 is one way to solve this, but then why post on hacker news? This seems contradictory.

Had to deepl "自主可控、纯中文国内社区" to understand that your comment meant it translated to "pure Chinese domestic community", which implies if we are not part of the gang, we can't enjoy the project.

Well, we've been doing this implicitly with English for a long time, so I guess Karma is a bitch.

On the other hand, I wrote a French technical blog for years, and it was way harder to reach a lot of people, so if I had to do it again, it would be in English.

They don't have this problem, since 1B people are Chinese.

> Well, we've been doing this implicitly with English for a long time, so I guess Karma is a bitch.

Or it's their loss. 7B people don't speak a word of Mandarin, and even more can't read and write it.

~7B of those would not pick up a new fringe language either way.
Nor will ~1B of the rest.
This doesn't seem like an appropriate conclusion. There's a massive semantic difference between "China #1" and "Sorry, I only know English." Karma doesn't come into play here.
That there’s apparently an unmet need or an unscratched itch might be newsworthy enough. If it’s a strategic move, them more so, surely?
At first glance it looks a lot like Go, but you can already compile Go to WASM I believe.

In which case I'm curious what are the differences or use case vs just using Go?

> At first glance it looks a lot like Go

But, this is not at all how go looks:

    fn add(a: i32, b: i32) => i32 {
        return a+b
    }
It looks heavily inspired from the syntax used in rust or zig tho. (fn keyword, variable type syntax, return value)

> what are the differences or use case vs just using Go?

- go has a different syntax, different keywords, different ecosystem and so on.

- go is a general purpose programming language, while wa is explicit in targeting wasm.

I don't see any special similarities more than they are c-style family languages.

There is a six character difference discounting the fact that one calls the type i32 vs Golang's int32; four are punctuation that may or may not be required for ability to parse correctly and 2 are from "fn" -> "func." Each of the common tokens is arranged in the same order relative to one another. If one affords themselves the use of "type i32 int32" in Golang, then it is

    fn add(a: i32, b: i32) => i32 {
        return a + b;
    }
vs

    func add(a i32, b i32) i32 {
        return a + b;
    }
Compare with a syntax like C, C#, or Java where you have tokens in the declaration in almost the reverse order

    i32 add(i32 a, i32 b) {
        return a + b;
    }
The two (Golang and Wa) are certainly distinct, but I would say they are closer than simply both being C-style for this particular case at least.
The ":" and "=>" are almost definitely superfluous, parsing "a: i32, b: 32" and "a, b: i32, c: i64" is no more difficult as parsing "a i32, b i32" and "a, b i32, c i64".

The same is true for colons in Python: they're not really necessary but provide slighlty better readability plus syntax highlighters can get away with using regexes, I guess.

Yep. In fact "a i32" is also legitimate, for now.
Wonder if this will pick up after Walt seems to have been abandoned in favor of AssemblyScript.

[0] https://github.com/ballercat/walt

[1] https://www.assemblyscript.org/

Apropos of approximately nothing, I had a hunch what this was about and was completely wrong!

The Hanzi had me going for about five seconds; they don't mean 和.

Anyway, if anyone does write a programming language with keywords and text in Kanji, let us know.

https://en.wikipedia.org/wiki/Wa_(Japanese_culture)

Since Classical Chinese is ancestral to kanji, you might be interested in https://wy-lang.org/
> The Hanzi had me going for about five seconds; they don't mean 和.

You mean Pinyin (拼音), not Hanzi (漢字).

This new information make Wario a completely different character to me
> His name is a portmanteau of Mario's name and the Japanese word warui (悪い), meaning "bad".
When I saw the headline, I figured this was something out of the University of Washington, and therefore named after my home state of Washington. :)

It obviously is not. What does “wa” mean in Chinese? Or is it really just (w)eb (a)ssembly?

"wa" is the pronunciation of "凹"

Chinese is a kind of hieroglyph. The shape of "凹" is very similar to the logo of this project, and it looks like the letter "C" rotated 90 degrees counterclockwise. So it maybe means a C/Coder that lies down.

So if there were a derivative (child) language, would it be called Ben Wa?
No matter its technical merits, I would never use a programming language where I don't know the dominant (natural) language of the community.

Every project has bugs and discussions how to work around them. This project has 12 Github issues. How severe are they? Will I hit them? I don't know because they are written in Chinese. (But this is not unique to Chinese, I feel the same way about French projects on OCaml and Coq).

Most people in the world pretty much have to, due to the prevalence of English in CS based businesses, projects, and academia.
Seems unlikely.

An estimated 2 billion people understand English globally. That number is only growing.

While Excel has probably the most programmers in the world, their instructions are localized.

And among programmers of other programming languages I bet that way over 50% understand English. So I’d say that most programmers do understand English.

>> An estimated 2 billion people understand English globally. That number is only growing.

And what's the reason for that? Exactly what the comment you are answering says.

>> While Excel has probably the most programmers in the world, their instructions are localized.

And what a mess that is. And if you have a problem chances are that the answer will be in English. So, again, you have to know English.

>> And among programmers of other programming languages I bet that way over 50% understand English. So I’d say that most programmers do understand English.

Again, they don't have an option, have they? Who knows? Maybe, someday in the future we will have to learn Mandarin.

I surely hope not, learning English is much much easier than Mandarin for a good 60% of the world : anyone speaking a language using the latin alphabet so most of Europe + America North and South + a good chunk of Africa. Even in countries where the main language is not using the Latin alphabet, it is very common to speak English or French.

People might not have much of an option because English is there de facto, but learning English is much much better than having to learn both English and Mandarin

There is a great deal more to learning a language than its alphabet, and English is probably one of the worst languages to learn that use the Latin alphabet, with many inconsistencies and exceptions in grammar and pronunciation. The reason so many people learn it is because they have to, not because it's easy to learn or use.

English is the JavaScript of human languages.

> I surely hope not, learning English is much much easier than Mandarin for a good 60% of the world : anyone speaking a language using the latin alphabet

As well as the writing system, there is another factor: Mandarin is tonal, English isn't. If your native language is non-tonal (true of roughly 50% of the world population), trying to learn a tonal language is an extra challenge on top of the general challenge of trying to learn another language. Your brain just isn't used to considering tone as semantically significant.

> And what a mess that is

Not really; there are no localized function names for languages that use non-Latin based scripts because otherwise one would have to constantly switch keyboard layouts to type any formula. Except for the Russian version of Excel which uses Latin-spelt cell names (D1, F2, etc.) but Cyrillic-spelt function names (ЕСЛИ, СУММ, БЕССЕЛЬ.J, etc.), of course.

> Maybe, someday in the future we will have to learn Mandarin.

Optimists study English, pessimists study Mandarin, realists study M16.

I agree with you: since my English is not good either, I am also reducing the dependence on English in my programming work.

For the Wa language, I hope to have a lightweight WASM Native language: no GC, no Goroutine. Also, I hope functions with "Chinese" names can be exported, which is forbidden in Go.

That's exactly why we created this project.

Over 7million programmers in China have to learn English first before they can study how to program, for most of them, "下标不可超过数组长度" is much more easier to understand than "the index of a array should not exceed it's length".

Are you aware of Ruby?
The Ruby creator is Japanese but if you want to start using it today, you don't even have to know who Matz is. The website with the documentation is in English and translated to quite a number of other languages.

It really is not the fair comparison and I get what the parent was refering to.

Ruby is developed in a English community. People communicate in English. That makes a difference.
In the Wa community, you can speak English and we can understand English. Likewise, others must have the right to speak Chinese. This is fair to both Chinese and English users.
It is more about how the project is developed and maintained.

For example, Vue is founded by a Chinese. But the development happens in English. Issue tracker, RFC, code comments, all in English. Therefore, people around the world would know what direction the project is heading towards.