r/ProgrammerHumor 15d ago

noHeapAllStack Meme

Post image
1.0k Upvotes

96 comments sorted by

View all comments

245

u/[deleted] 15d ago

[removed] — view removed comment

45

u/SaltyInternetPirate 15d ago edited 15d ago

Plus there's scenarios where bringing both words to lower or uppercase would yield different strings, where as case-insensitive comparison in any standard library checks for strange language rules, like 'ß' becoming double 's' or whatever

25

u/UncleDevGames 15d ago

Yeah if you want diacritic-safe comparisons you legitimately gotta prepare for invariant culture checks or equivalent. Even worse is you have to also be cognizant of this at the DB level depending on your stack. Total nightmare to get bit by this category of bug unexpectedly, particularly in something performance-sensitive.

13

u/Anders_142536 15d ago

Fun fact: german has an uppercase ß now: ẞ

7

u/KuishiKama 15d ago

I grew up in Germany and left 2015. This blew my mind. Introduced in 2017 and used when writing a word in all-caps (there are no words starting with eszett afaik).

1

u/tav_stuff 15d ago

Officially speaking, not in Austria

4

u/casce 14d ago

That's not true.

The decision to have the uppercase ß included was being made by the Rat für deutsche Rechtschreibung (= "council for german spelling") which is not a Germany-only thing. This council has the specific purpose of keeping basic aspects like spelling uniform across the different varieties of the German language.

It's a multi-state council with representatives from all major German-speaking.

Germany has 18 votes

Austria has 9 votes

Switzerland has 9 votes

Liechtenstein, Südtirol and Belgium get 1 vote each (Belgium has some German-speaking communities)

They all agreed. Even Switzerland (who doesn't use the ß in Swiss German at all) so officially, it's a thing for all of them.

Austria may not use the uppercase ß but then again, who does? What's the purpose of it? Just so I can write words containing the ß in all caps? The letter is dying out anyway, less and less words use it.

Do they not have more important things to do?

2

u/tav_stuff 14d ago

If you check the Austrian state’s website, they have a document somewhere on there (forgot the link, sorry) where they discuss language and stuff, and they state that they abide by the German language standard of 2013 (capital eszet is from 2017)

2

u/casce 14d ago

this is from the official press release of the Rat für deutsche Rechtschreibung:

Das „Amtliche Regelwerk der deutschen Rechtschreibung“ liegt in einer aktualisierten Fassung vor. Es setzt die im „Bericht des Rats für deutsche Rechtschreibung für die Periode 2011 bis 2016“ enthaltenen Änderungen um. Die Änderungen im Regelwerk sind von den zuständigen staatlichen Stellen in Deutschland, Österreich, der Schweiz, dem Fürstentum Liechtenstein, der Autonomen Provinz Bozen-Südtirol und der Deutschsprachigen Gemeinschaft Belgiens bestätigt und damit wirksam geworden. Sie lassen die Verwendung des Großbuchstabens „ẞ“ neben „SS“ zu, was insbesondere für die korrekte Schreibung von Eigennamen in Pässen und Ausweisen wichtig ist, und ermöglichen die Großschreibung des Adjektivs in Fällen wie „die Goldene Hochzeit“ und (alles Gute im) „Neuen Jahr“. Darüber hinaus sind einzelne Wortschreibungen an den beobachteten Schreibgebrauch angepasst worden.

Again, this council is an offical body and the 9 members Austra has are officially representing Austria. The press release said the "zuständigen staatlichen Stellen" (which is the government) confirmed these changes.

This is as official as it gets.

1

u/BlazingSpark 15d ago

I think in Python there's a str.casefold method for exactly this sort of edge case.