J
Jukka K. Korpela
The syntax of ECMAScript has allowed “extended characters†in
identifiers since 3rd edition (1999). This means, among other things,
allowing any Unicode letters, like Greek, Arabic, and Cyrillic letters
as well as e.g. Chinese ideographs. As far as I can see, this has been
supported in web browsers for a long time (e.g., ever since IE 5.5).
So is it really safe to use them, writing, say
var π = Math.PI;
var ผลบวภ= 0;
function Götterdämmerung()
or are there some pitfalls? Various coding conventions as well as
practical editing issues (you can’t be sure of always being able to edit
your code on a Unicode-enabled editor) aside, is there still some real
technical reason to stick to the A–Z, a–z, 0–9, â€$â€, â€_" repertoire?
identifiers since 3rd edition (1999). This means, among other things,
allowing any Unicode letters, like Greek, Arabic, and Cyrillic letters
as well as e.g. Chinese ideographs. As far as I can see, this has been
supported in web browsers for a long time (e.g., ever since IE 5.5).
So is it really safe to use them, writing, say
var π = Math.PI;
var ผลบวภ= 0;
function Götterdämmerung()
or are there some pitfalls? Various coding conventions as well as
practical editing issues (you can’t be sure of always being able to edit
your code on a Unicode-enabled editor) aside, is there still some real
technical reason to stick to the A–Z, a–z, 0–9, â€$â€, â€_" repertoire?