Language change proposal

Chris Pressey cpressey@REDACTED
Wed Oct 22 18:29:25 CEST 2003

On Wed, 22 Oct 2003 13:26:30 +0200 (CEST)
Joe Armstrong <joe@REDACTED> wrote:

> Hi everybody - I'd like to propose the following language change:
> (It's *very* easy to implement)
> I want all Erlang modules to be tagged with a "language version"
> Like this ...
> ---------------------------------------------------------------------
> ---
>     Suppose the next version of Erlang is 5.3 then:
> 	1) All modules *must* start
> 	-module(XXXX).
> 	-vsn("5.3").

It's a good idea, but wouldn't it be easier to write code that works on
different versions if it was done with macros,  e.g.

  % some code that uses bleeding-edge features here
  % some code that uses 5.2-isms here
  % some code that is dangerously language-version-unspecific here

I think this would be the way to go if you wanted to write code that
takes advantage of new features while still being able to compile and
run on older installations.

Even slicker would be if there was a single ?ERLANG_VERSION predefined
macro, and a way to check its value with conditional compilation.

Nothing earthshatteringly new, of course (are we finally catching up to
cpp? :)


More information about the erlang-questions mailing list