[erlang-questions] erlang improvement - objective c (or smalltalk) syntax

Bengt Kleberg <>
Thu Jun 4 13:35:27 CEST 2009


So the benefit of the new syntax would be that I would have a second
(canonical) function available when doing m(Module), that described the
argument order of the first (main?) function?
That could be done right now, without new syntax, could it not? As a
programmer I could double all my interface functions with a longer name
that included the arguments in the right order.


bengt

On Thu, 2009-06-04 at 13:06 +0200, Vlad Dumitrescu wrote:
> On Thu, Jun 4, 2009 at 12:56, Bengt Kleberg <> wrote:
> > Does the "canonical form" concept mean that the (hypothetical, new,
> > improved) string module would have both substring/3 and
> > substring_string_start_length/3 exported?
> >
> > And that I could either call
> > string:substring( string:S start:I length:J )
> > or
> > string:substring_string_start_length( String, Start, Length )
> > ?
> 
> You could also call string:substring( length:J, start:I, string:S ) or
> string:substring( length:J, string:S, start:I ), with the same result.
> 
> > But neither
> > string:substring( String, Start, Length )
> > nor
> > string:substring_string_start_length( string:S start:I length:J )
> > would not work?
> 
> I would expect string:substring( String, Start, Length ) to continue
> working, we have to keep old code working.
> 
> regards,
> Vlad



More information about the erlang-questions mailing list