Valid JavaScript variable names
mathiasbynens.be
mathiasbynens.be
As my father said "just because you can put your penis in a goat, doesn't mean you should".
type Polar struct {
R, θ float
}Emacs is alright about it though. There are keybindings for entering Unicode characters by name or number, and for getting information about the character at the cursor. You can also use a TeX-like input mode where “\lambda” is automatically replaced with “λ”. But really, I’d rather we rethink input methods altogether.
I'll load up google, then find unicode charts and locate this. So writing your variable name will take about 15 to 30 minutes. Thanks a lot
That fails when you don’t know the name of the character, in which case you can use something like Shapecatcher (http://shapecatcher.com/), but then how do you know whether it’s a Greek theta or a Coptic thethe or a Cherokee na or Cyrillic fita or Latin barred O?
Clearly our editing powers need to improve if we’re to feasibly use non–English-alphanumeric variable names.
In .NET CLR languages, you can use Unicode for identifiers like in JS, but an interesting side-effect of the 'common' aspect of the CLR is that you can use reserved keywords too. This is because reserved words in one language are not necessarily reserved words in another language.
Someone could write the following valid definition in VB.NET:
Public Property ushort() AS Integer
And because it's a reserved keyword in C# you'd have to reference it using the '@' escape: foo.@ushort = 123;
(There are probably far more confusing examples than this)If you wish to make the sound, position your tongue like you're trying to stick it down your throat. The bottom of the tongue should be touching the top of your mouth. Then, make a "tuh" sound. If you do it right, it should sound hollow and "harder" than a normal Englilsh "t" sound.
The letter is SHIFT + ' (or just ") to yield ಠ.
Unfortunately, you apparently can't do it on OS X without bringing up a menu and/or changing your keyboard layout: http://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_...
For no particularly good reason, ☺ and ☠ are illegal. I think the Plan9 strategy of considering non-ASCII characters as identifier characters by default is probably a better one than changing the language grammar every time the Unicode standard revs.
(As mentioned in another comment, http://canonical.org/~kragen/setting-up-keyboard.html https://github.com/kragen/xcompose. The Chinese I copied and pasted from http://www.mdbg.net/chindict/chindict.php?page=radicals though.)
i smell new xss exploits....
function λ(code) {
return eval(
"function () {"+
" var $=arguments;" +
" return " + code + ";"
"}"
);
}
var sum = map([1,2,3,4], λ("$[0] + $[1]"));
I'm not really serious, but I'd like eval-less version of this, very, very much. function(x,y) { return x*y; }
is so verbose. def ಠ_ಠ
puts 'i like turtles'
endCREATE TABLE ""("" "");
A zero length table name with one column with a zero length name having a type of a zero length name.
php > $ಠ_ಠ = 1;
php > echo $ಠ_ಠ;
1
php > $π = pi();
php > echo $π;
3.1415926535897931159979634685442
php > function ಠ_ಠ() { echo 1; }
php > ಠ_ಠ();
1