[erlang-questions] erlang improvement - objective c (or smalltalk) syntax
Pierpaolo Bernardi
olopierpa@REDACTED
Thu Jun 4 12:57:23 CEST 2009
On Thu, Jun 4, 2009 at 11:10 AM, Joe Armstrong <erlang@REDACTED> wrote:
> Solution: write the call like this.
>
> string:substring( string:S start:I length:J)
>
> This could be expanded into a canonical form:
>
> string:substring_start_string_length(S, I, J)
>
> where the tags are sorted.
You mean
string:substring_start_string_length(I, S, J)
I suppose?
> This would also make the definitions of functions *shorter*
> and almost self-documenting
>
> ie: today I might write something
>
> f123(FileName, Mode) ->
> Fin = FileName ++ ".erl",
> Fout = FileName ++ ".beam",
> compile(Fin, Fout, Mode).
>
> whereas I could write
>
> f123(filename:F mode:M) ->
> Fin = F ++ ".erl",
> Fout = F++ ".beam",
> compile(Fin, Fout, M).
Like others have already commented, I too don't consider this an
improvement.
Cheers
P.
More information about the erlang-questions
mailing list