I'm new to Erlang and just wonder why the variables are designed to begin with capital letter which is so different from that in other languages?
Perhaps because that is immutable?
Early versions of Erlang were implemented in Prolog, and just like Prolog, Erlang variables start with either an uppercase letter or an underscore.
In addition to what @SteveVinoski said,
Starting with a capital letter separates variables from atoms, which are used frequently in Erlang code. Atoms always start with a lowercase letter. Both module and function names are atoms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With