Language change proposal

Chandrashekhar Mullaparthi Chandrashekhar.Mullaparthi@REDACTED
Thu Oct 23 14:21:35 CEST 2003


Hi,

> -----Original Message-----
> From: Joe Armstrong [mailto:joe@REDACTED]
> Sent: 22 October 2003 12:27
> To: erlang-questions@REDACTED
> Subject: Language change proposal
> 
> 
> 
> 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").

I don't know how useful this will be. Isn't it enough if we extend the
syntax of the .app file to specify this. After all, the smallest component
which is *shipped* is an application. 

{application, Application,
  [{description,  Description},
   {vsn,          Vsn},
   {id,           Id},
   {modules,      [Module1, .., ModuleN]},
   {maxT,         MaxT},
   {registered,   [Name1, .., NameN]},
   {applications, [Appl1, .., ApplN]},
   {included_applications, [Appl1, .., ApplN]},
   {env,          [{Par1, Val1}, .., {ParN, ValN}]},
   {mod,          {Module, StartArgs}},
   {start_phases, [{Phase1, PhaseArgs1}, .., {PhaseN, PhaseArgsN}]}]}.

We can include an extra tag here which specifies the version of ERTS
required. This should be optional. 

As in

   {erts_vsn,    ErtsVsn}

where ErtsVsn = {minimum, "5.3"} | {only, "5.3"} ??

The .rel file already requires that the version of ERTS be specified and is
strictly enforced when a system is being built.

In another email, you wrote:
> I also *hate* stuff that is hidden away in version control software -
> I much prefer explicit versioning in the code where I can read it -
> Stuff which is hidden in CVS/clearcase etc. often prevents a module
> from having a life of it's own outside the versioning tool ...

I can't comment about clear case, but in CVS, if the version in the module
is specified as 

-vsn('$Id: $ ').

When the code is checked in, the $Id: $ is translated to 

-vsn('$Id: dl_parse.erl,v 1.10 2003/06/19 10:58:32 chandru Exp $ ').

which is visible in dl_parse:module_info().

5> dl_parse:module_info().
[{exports,[{is_vcard,1},
           {parse_vcard,1},
           {parse_command,1},
           {many_to_rest,1},
           {module_info,0},
           {module_info,1}]},
 {imports,[]},
 {attributes,[{author,[chandru@REDACTED]},
              {vsn,['$Id: dl_parse.erl,v 1.10 2003/06/19 10:58:32 chandru
Exp $ ']}]},
 {compile,[{options,[v3]},{version,"4.1"},{time,{2003,10,23,11,54,5}}]}]

cheers
Chandru



 NOTICE AND DISCLAIMER:
This email (including attachments) is confidential.  If you have received
this email in error please notify the sender immediately and delete this
email from your system without copying or disseminating it or placing any
reliance upon its contents.  We cannot accept liability for any breaches of
confidence arising through use of email.  Any opinions expressed in this
email (including attachments) are those of the author and do not necessarily
reflect our opinions.  We will not accept responsibility for any commitments
made by our employees outside the scope of our business.  We do not warrant
the accuracy or completeness of such information.




More information about the erlang-questions mailing list