[erlang-questions] literal character syntax

Kostis Sagonas kostis@REDACTED
Thu May 15 14:38:54 CEST 2014


On 05/15/2014 12:36 PM, Anthony Ramine wrote:
> $ gg -i "stupid emacs" -- \*.erl
> lib/compiler/src/cerl.erl:994:    io_lib:write_string(atom_name(Node), $'). %' stupid Emacs.
> lib/compiler/src/core_scan.erl:96:string_thing($') -> "atom";    %' stupid emacs
> lib/compiler/src/core_scan.erl:97:string_thing($") -> "string".  %" stupid emacs
> lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl:313:string_thing($') -> "atom";   %' Stupid Emacs
> lib/dialyzer/test/options1_SUITE_data/src/compiler/cerl.erl:843:    io_lib:write_string(atom_name(Node), $'). %' stupi
> lib/edoc/src/edoc_wiki.erl:238:expand_triple([$', $', $' | Cs], L, As, _L0) ->      % ' stupid emacs
> lib/hipe/cerl/erl_types.erl:4798:        true -> io_lib:write_string(atom_to_list(X), $'); % stupid emacs '
> lib/stdlib/src/erl_scan.erl:331:string_thing($') -> "atom";   %' Stupid Emacs
> lib/syntax_tools/src/erl_prettypr.erl:1011:               lay_string_1([$" | S2], L - W + 1, W))  %" stupid emacs

I may be slow today, but I really do not understand how the above is 
related to what the original subject asked for.  The above that you 
point out shows a current limitation/stupidity of the emacs-mode file, 
not of Erlang, right?  (Again, I repeat, I may be failing to see your 
point...)

[Aside: Just for my information, is there some escape-like way of 
writing the single quote character?]

> The whole point of Erlang was always to make silly things quite hard to do.

I am not so sure this was the whole point of Erlang.  In my mind at 
least the whole point of Erlang was to ease concurrent and/or 
fault-tolerant programming which are VERY hard in the first place, not 
to make anything (no matter how silly it may be) harder.

Kostis



More information about the erlang-questions mailing list