Created
May 4, 2017 10:50
-
-
Save anonymous/2e8babd349167a49eb6f6d55ec0505c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env escript | |
%% -*- coding: utf-8 -*- | |
%%! +pc unicode | |
-module(hello). | |
%-mode(compile). | |
-export([main/1, 'hello_юникод_世界,'/0]). | |
main(_) -> | |
% io:format("~p~n", [{io:printable_range(), io:getopts()}]), | |
% 'hello_'(), | |
io:setopts([{encoding,unicode}]), | |
% io:format("~p~n", [{io:printable_range(), io:getopts()}]), | |
'hello_юникод_世界,'(), | |
io:format("~tp~n", [{"Hello, 世界, юникод"}]). | |
'hello_юникод_世界,'() -> | |
io:format("~tp~n", [{'hello_юникод', <<"Hello, 世界; юникод"/utf8>>, "Hello, 世界; юникод"}]). |
It's not even the 20 release, and unicode names are quickly getting unreadable and out of control 😄
@kvakvs the Java world, and JavaScript supported Unicode identifier since the very beginning (since 90s?) and supported by many other programming languages as I know; did any of those get out of control 😄 ?
➸ ./opt/node-v8.0.0-linux-x64/bin/node
> var hello_юникод_世界 = 42;
undefined
> hello_юникод_世界
42
> console.log(hello_юникод_世界);
42
undefined
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
to compile it with
erlc
orc()
in Erlang shell, the first line has to be commented out, but how about change erl compiler to ignore first line if it starts with#!
?