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

Kenneth Lundin <>
Thu Jun 4 14:36:02 CEST 2009


It would be easy to implement tab-completion of functions with
argument names and types based on the
type specifications which are in place in many of the modules in
kernel and stdlib.
The typespec info can easily be retrieved from the beam files without
need for documentation.

The typespec notation will be used in edoc and in the ordinary
Erlang/OTP documetation as well.

I recommend an approach where all exported functions have typespecs
and that the possibility to
assign a Mnemonic name to each function-argument is used.

When having that in place it will be easy to support tab-completion in
the shell as well as in IDE's.


/Kenneth Erlang/OTP Ericsson

On Thu, Jun 4, 2009 at 2:21 PM, Vlad Dumitrescu <> wrote:
> On Thu, Jun 4, 2009 at 14:04, Alin Popa <> wrote:
>> Please correct me if I'm wrong, but
>> string:substring(String)from(Start)length(Length) does not look more like an
>> actual multiple function calls (  substring(String) - one function call,
>> from(Start) - other one, and so on ... ) ?
>> I don't know that this solution may keep backward-compatibility with the old
>> syntax.
>>
>> Or maybe I'm missing something here.
>
> Since there's no comma between the "calls", it is an illegal syntax
> today. That was only a suggestion for syntax (and I might even
> remember it wrong), there might be better alternatives.
>
> Could I dare throw in a sales pitch?
>
> erlIDE shows the function's documentation beside the list with
> completion suggestions, so the docs are never too far away. At the
> moment, only the standard libraries' docs are shown prettily
> formatted; one's own code is just the raw comments before the function
> definition.
>
> regards,
> Vlad
>
> ________________________________________________________________
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
>
>


More information about the erlang-questions mailing list