Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Rost – Write rust code in German (github.com/michidk)
55 points by michidk on Nov 10, 2021 | hide | past | favorite | 16 comments


Die Ironie wenn das LIESMICH in Englisch ist.

The irony when the README is in English.


The complete disrespect for capitalization rules is even more ironic.


This makes me wonder - are there programming languages that are naturally suited to be written in some particular human language?

Off the top of my head:

Perl should be written in Welsh.

Lisp should probably be written in Greek.

not sure about others, but personally -

Cobol in German.


See also Perligata. Not saying Welsh isn't better. I'm neither a Perl nor Latin expert, so I just trust em when they say

> Latin is a surprisingly good fit for Perl. The rich case structure provides an abundance of plausible mappings for Perl data types and subroutine calls...

[1] https://users.monash.edu/~damian/papers/HTML/Perligata.html


I'm not sure if I agree with it, but you could make an argument that programming languages are colored by the L1 languages of their initial designers. So you might see a bit of Japanese in Ruby, and a bit of Brazilian Portuguese in Lua. But programmers in general tend to have excellent English and are inspired overwhelmingly by languages written by English speakers, so it's difficult to evaluate.


I guess Ruby's compatibility errors for incompatible encodings comes from familiarity with Japanese encodings which presents problems most American programmers would be unfamiliar with.


Python should be written in English.


I would have thought Java a better match for German and the long compound words.


Germans and Powershell: a match made in Himmel


I love this kind of stuff! It's important for source code to be able to handle non-ASCII characters but we need to be mindful of the different ways that an editor will "lie" to you about your code. The most recent example of this in Rust [1].

> As part of their research, Nicholas Boucher and Ross Anderson also uncovered a similar security issue identified as CVE-2021-42694 involving homoglyphs inside identifiers. Rust already includes mitigations for that attack since Rust 1.53.0. Rust 1.0.0 through Rust 1.52.1 is not affected due to the lack of support for non-ASCII identifiers in those releases.

The easy reaction is "Why are we allowing non-ASCII characters at all? Just so we can put emojis in our variable names?"

This project is a good example of why we do it. But as with everything, we need to be careful about it.

[1] https://blog.rust-lang.org/2021/11/01/cve-2021-42574.html


On a related note, I've always wondered: when code is written with Chinese ideographs in identifiers (variable names etc), is it typically more compact/narrow? I always struggle with variable naming because of the tradeoff between descriptiveness and length; do ideographs help?


Could we rewrite German in Rust to make it faster?


Seems like the ideal language to write a new, European and sovereign implementation of Marcel, the French docker.


I enjoyed the code walk-through. :D


Total verrückt


Gotta love Europe!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: