jed-users mailing list

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

API


Hi,

I see many weird functions in the API, they aren't necessary in my eyes.

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.
...

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")

I don't know if slang supports inline-ing, otherwise all these functions
wastes time and space, because (correct me if I'm wrong) a direct call of
up(1) is faster then up_1().

Any time ago, Günter told me, that up_1() and go_up() should go into the
C code, but there aren't any information about this. Is this really
planed? When will this happen? Which functions are affected?

Antoine de Saint-Exupery said many many years ago:
Perfection is reached, not when there is no longer anything that can be
added, but when there is no longer anything to take away.

With all this, I want to say, we should not bloat up the API with all
these small code snippet, that are written in the same time again like
the name of a new function (bol_skip_white). It should include really
needed or often used functions. And we should think about the balance
between the benefit of a go_up_1 functions and a ()=up(1); Maybe a
skip_line(-1) could do the same for up and down.

Jörg.

--------------------------
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]