Include in standard library or build in?

new topic     » topic index » view thread      » older message » newer message

I can see a lot of proposals for additions in the standard library, specially in
the field of basic sequence manipulation.

This will save typing, and spare the bugs that come with reinventing the wheel.
Good.

However, sometimes, it may be more efficient to implement some routines as
built-ins rather than in include files. One of the main reasons is that checks of
various kinds are performed twice or more, and data which is available at run
time is being queried by several pieces of code, for more IL opcodes and no
benefit.

For very basic routines (I have head(), tail() and mid() in mind, and perhaps a
couple others), we should expertise whether moving them inside the interpreter
might not help the language by increasing efficiency, and in some cases making
code leaner instead of adding layers on top of one another.

This could be a Rule #6: Check the compared benefits before choosing between
stdlib and backend (applies to basic functionality only).

CChris

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu