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

Vlad Dumitrescu <>
Thu Jun 4 13:06:26 CEST 2009


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