jed-users mailing list

[2006 Date Index] [2006 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: make_ini and autoload


G. Milde <g.milde@xxxxxx> wrote:
>>    array_map (Void_Type, &autoload, 
>>               ["buffer_compress", "spaces2tab", "format_table",
>> 	       "goto_max_column", "format_table_rect"],
>> 	      "M:\\jed\\libjmr\\csvutils.sl");
>
>This looks promising but is not significantly faster:

I didn't mean to imply that it would be faster.  I just wanted to
point out another mechanism to carry out this task.  The advantage of
it is that it avoids an explicit loop and in many cases produces
simpler looking code.  For example, compare:

   variable i;
   _for i (0, length(arr)-1, 1)
      funct (arr[i]);

to

   array_map (Void_Type, &funct, arr);

or

   variable result = Some_Type[length(arr)];
   variable i;
   _for i (0, length(arr)-1, 1)
      result[i] = funct (arr[i]);

to

   variable result = array_map (Some_Type, &funct, arr);

[...]
>So, here is my feature request for an improved autoload():
>
> SYNOPSIS
>  Load functions from a file
>
> USAGE
>  autoload(String funct, [String funct2 , ...], String file);

I will look into extending autoload to support this, but do not look
for it anytime soon.

Thanks,
--John

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2006 date index] [2006 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]