Apple Swift
-
Is anyone really arguing against alphabets as valid for identifiers? My problem is with ridiculous symbols that have little or no differences and little meaning.
-
Have you ever read code written by someone who grew up in Russia? Or Turkey? Maybe Taiwan?
Then modified by someone from Japan. And them bugfixed by someone from Saudi Arabia.
With the documentation written in a boustrophedonic script.
What could possibly go wrong?
-
Then modified by someone from Japan. And them bugfixed by someone from Saudi Arabia.
With the documentation written in a boustrophedonic script.
What could possibly go wrong?
Of such things are WTFs born ...
-
Have you ever read code written by someone who grew up in Russia?
Yes. They've got some awesome programmers.
-
"Fun" fact: I was actually taught that a 1-dimensional array is called "niz" (loose translation: sequence), and multi-dimensional arrays are called "polje" (close enough).
Interesting, in Slovenian "niz" is string, while "polje" is array.
-
You're only really fucked because there exist very few tools for dealing with multiple languages in the general case, and even less in the "programming language" case - it's mostly a case of picking a representation and sticking with it. There have been a number of non-english based languages, including at least one which could use multiple languages for keywords and the like (although only one at once, obviously; it was, however, possible to swap the languages "on the fly" and have your program "rewrite itself" automagically - the "magic" was pretty simple and attached symbolic names in language X to the tokenised value of keyword Y, and vice versa)
This does become somewhat philosophical in nature, though.
// given this uint8_t frobnitz (uint8_t a, uint8_t b) { return a + b; } // is this uint8_t a = 1 + 2; // equivalent to this? uint8_t b = frobnitz(1, 2); // or this? uint8_t(*foobar)(uint8_t,uint8_t) = &frobnitz; uint8_t c = (*foobar)(1,2);`
The answer is not as definitive as it might seem, and is probably "it depends".
That said, Swift doesn't appear to bring anything particularly new to the table, apart from the potential for non-or-incorrectly-normalised-unicode "issues". Because it's not like Apple have ever been bitten by anything like that, is it?
In order to do away with all this potential for ambiguity, we really need a language which is simple to define. I propose the humble lambda calculus, restricted to names of the form "x…", where "x" is the literal x character, and the ellipsis (see what I did there?) represents, as is conventional, repetition. Want math? Use Church encoding. Sure, it might seem a little spartan, but I'm sure that in a few years it will approach the levels of performance we're seeing from Discourse.
[edit] - why is my code block not showing up?
[edit - you need three backticks to delimit a code block. Or indent by four spaces (Ctrl-K or the </> button or.. - PJH]
-
Interesting, in Slovenian "niz" is string, while "polje" is array.
I usually heard "niz znakova" for string around here. Though I got the impression there's no real standard anyway. They just seem to be pulling stuff out of their ass most of the time.
-
Though I got the impression there's no real standard anyway. They just seem to be pulling stuff out of their ass most of the time.
Pulling stuff out of your ass is standard programming practice.
-
Pulling stuff out of your ass is standard programming practice.
Ah, so that's what they mean by this whole "Extreme Programming" thing...
-
Nah, that's a combination of "pair programming" and "stuffing things up other people's asses"
-
"stuffing things up other people's asses"
I assume that if you stuff something up an ass, you then have to pull it out of an ass. Not necessarily your ass, but still...
-
The Programmer Centipede.
[image redacted]
-
I assume that if you stuff something up an ass, you then have to pull it out of an ass.
That depends on what it is. It may come out on its own.
-
That depends on what it is. It may come out on its own.
If you shove hard enough, it can come out somewhere else.
-
-
Then modified by someone from Japan. And them bugfixed by someone from Saudi Arabia.
With the documentation written in a boustrophedonic script.
What could possibly go wrong?
I once had the [mis]fortune of reviewing code written by a Chinese developer who had defined all variables and constants in Chinese, but instead of using a pinyin representation so that they were at least pronounceable (if not something I could actually understand), he used whatever sequence of keys were required on his particular keyboard's mapping to produce the actual Chinese characters from an en-US layout. So the variables were all things like "xeoGekgw" and "pQwzjMrr".
Filed under:My head asplode
-
So the variables were all things like "xeoGekgw" and "pQwzjMrr".
Maybe he was just naming his variables after my commit messages on Github. Or my nickname-choosing strategy.
Filed under: my hands are typing words, A local variable named 'xeoGekgw' is already defined in this scope
-
So the variables were all things like "xeoGekgw" and "pQwzjMrr".
Apparently Chinese-language support is spotty enough that quite a lot of the more nerdy Chinese can just read this on sight. ("I don't even see the code anymore.")
If that's not a testament to the fact that people can get used to literally everything, I don't know what is.
-
Apparently Chinese-language support is spotty enough that quite a lot of the more nerdy Chinese can just read this on sight. ("I don't even see the code anymore.")
If that's not a testament to the fact that people can get used to literally everything, I don't know what is.
I don't see "xeoGekgw" and "pQwzjMrr", I see "pBlonde" and "pBrunette."
-
-
-
whatever sequence of keys were required on his particular keyboard's mapping to produce the actual Chinese characters from an en-US layout.
And for those who don't think it's bad enough already, there is at least fifteen of those in common use.