- Subject: Re: API
- From: "John E. Davis" <davis@xxxxxxxxxxxxx>
- Date: Thu, 17 Jul 2003 14:26:47 -0400
Joerg Sommer <joerg@xxxxxxxxxxxx> wrote:
>exchange_point_and_mark: a wrapper for call("exchange") with a better name
>bol_skip_white: for those who forget the functions bol() and skip_white()
>go_{up,down}: for those who don't want to clean the stack.
The point of these functions is not to allow one to be lazy. Rather,
using e.g., bol_skip_white() intead of "bol();skip_white()" results in
half the byte-code for a compiled function. That is, the use of these
functions means less memory is used. The trade-off, as you noted is
that there is a small amount of function call overhead.
>Some functions make sense, but the most part is a bloat. They makes it
>hard to learn the API and find the function, that is needed. And as the
>top of all, there are maybe more then one function in site.sl, that
>replace a internal function and don't do anything more.
>define newline ()
>{
> insert_char('\n');
>}
>
>vs. call("newline")
In addition to the memory savings, there is another advantage to using
the functional form that one may or may not use, e.g.,
define do_something_n_times (something, n)
{
loop (n) (@something)();
}
do_something_n_times (100, &newline);
I hope this provides some insight into the existence of these functions.
Thanks,
--John, who routinely uses jed on a 486 with 16 Megs of memory.
--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.
[2003 date index]
[2003 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]