[erlang-questions] Intel Quad CPUs

Taavi Talvik taavi@REDACTED
Tue Sep 4 16:27:02 CEST 2007


On Sep 4, 2007, at 4:23 PM, Hugh Perkins wrote:

> On 9/4/07, Chandru <chandrashekhar.mullaparthi@REDACTED> wrote:
>> On 03/09/07, Hugh Perkins <hughperkins@REDACTED> wrote:
>>>
>>> The only bits that worry me slightly are:
>>> - the rather cavalier attitude to parameters, which is very evident
>>> when you call get_fun_info on a function exported from a module, and
>>> simply get told, well it takes 3 parameters.  Yay!
>>
>> Well, it is an untyped language, so what else can it possibly return?
>
> That's the point.  It's not something that can be added in a library
> later.  It's an intrinsic part of the language specs.
>
> To be honest, I can live without the type being specified, but it
> would be good to be able to retrieve at least the parameter names.

Hmm, strange wishes..

Parameter names are just for documentation purposes.

function("abcd" ++ Rest)
function([A,B,C,D|Rest])
function(List)
function(_)

All above are valid clause heads for function. It is quite hard to name
all possible patterns consistently.

However look at:

Convention for type notation
	http://www.erlang.org/doc/apps/edoc/part_frame.html

Tool for static verification using above notation
	http://www.erlang.org/doc/apps/dialyzer/index.html
	
Beam files manipulations library - you get abstract code, if present  
in module
	http://erlang.org/doc/man/beam_lib.html

Abstract format (even variable names are present)
	http://erlang.org/doc/apps/erts/absform.html

best regards,
taavi






More information about the erlang-questions mailing list