General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Anony Mousse
Inkbox
comments
Comments by "Anony Mousse" (@anon_y_mousse) on "Why is @ on your computer keyboard?" video.
I've always liked the at symbol, and it never made sense that in C and languages based on it that they went with ampersand to indicate address of. I guess if e-mail had become popular before C was designed that it would be the other way around, but for my own language I decided to break from the convention that C uses and instead use the at symbol for my address of operator. I think this video vindicates my choice.
70
@katrinabryce I must be part British then because I understand pence.
9
@jrstf Except that it didn't use it to dereference, but rather to denote that it was a variable, period. Using it for literally every manipulation of a variable is certainly tiresome.
7
@nikdog419 A few years back they proposed getting rid of pennies and making nickels the lowest denomination coin. Thankfully they didn't do it because it would've led to extra inflation, but what we're seeing now makes it a rather moot point.
6
@Kycilak I don't disagree that it is confusing to use the same symbol to declare a pointer and dereference it, but I'd actually rather not use @ for dereferencing, and instead look to a new symbol, such as $. Consider that what dereferencing really is, is acquiring the value at that address. Obviously using such a symbol would be a bit fraught, but for internationalization of my language it could be possible to use any country's currency symbol.
5
@kanucks9 Getting rid of pennies necessitates rounding to the nearest nickel, thus it causes inflation. I dare you to suggest that even a tenth of the companies currently operating will ever round down, and if even that many would, it would still have a massive effect.
3
If you're referring to $, shell scripts use it to read the value and BASIC used it as a postfix designator for strings. I don't mind its usage in shell scripts since you don't need it for assignments. And you only need to use it once to refer to variables inside substitutions and arithmetic expansions. Like x=10; y=20; z=$(( x + y )); or at all in: for (( i=0; i<10; i++ )); do ... done # I don't want to copy BASIC's Hungarian notation, though.
2
@OrangeDog20 Um what? Declaration and use are most definitely not the same. Consider: char *s = "foobarbaz"; s += 3; printf( "%s\n", s ); // doesn't include the * symbol to dereference at any point or to manipulate the address; Also you could access individual elements of the string with s[index]; and not use the * symbol there either.
1
@Qazqi True, and it still doesn't, technically. However, it is included in ASCII and has been since before K&R's book was published, thus both could have been added. Of course I wouldn't expect the committee to add them at this point, for anything, but they'll certainly be in my language.
1