Porting Euphoria

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

Never release the code, you simply shouldn't do that.
Keep it in YOUR control.

-=-

But split it up in different packages.
One program that is written in pure C is the main interpreter.
It uses a special lib (that can be upgraded on itself) that has *machine*
specific code.
Not the routines used by the interpreter, but only small pieces of code,
where optimization is important stuffed in one library. (there would only be
a IBMPC lib and in the future maybe an UNIX or MAC lib)
It would also contain the built-in functions that are not OS specific (like
find () and append ()) but are only Machine specific. (proccesor specific)
One of the built-in functions already available at this point is called
something like load_library.
The standard include file dos32.e loads up the dos32 library and defines how
the data needs to converted to which datatypes, and which error messages are
used. They also provide the type checking.
You would also have a win32.e and maybe an OS2.e interface.
In these libraries you would find the built-in routines for DLL's, Graphics,
Mouse.
These libraries also can be updated independently.
If you wanne write a cross platform using OS-dependent routines, you need to
include both.
The libraries extensions (the dos32.e and the win32.e) have to sort out
which library routine is activated and which isn't.
The load_lib function off course stays available during the whole program.

-=-

Robert, what about wildcard including..

    include \plugins\*.e

I don't think I need to explain this..

-=-

What about the ability to initiate a routine and receive its routine ID or
error message from source code in sequence form passed to a routine.

    id = initiate_function ({" return length(s1) "}},"sequence s1")
    printf ("The lengths of TXT is %d",{call_func(id, "TXT"})

-=-

Null values.. not yet initializid vars have a value of NULL.
Vertical slicing will put NULL values where needed.
Operations performed on NULL stay NULL.
NULL is nothing.. puts (1, NULL) puts nothing.
Its its own data type.
Stuff declared as integer or atom can never be NULL.
Sequences can not be NULL, but may contain NULL values.
Object can be NULL through.
Each routine or function can decide for themselves what to do whenever one
of the arguments is NULL.
(Unlike some languages where a NULL argument means: not call
funciton/procedure)

-=-

Whatever you do, make us able to call lib files (as we can call DLL's under
win32, we need to call a standard type of library under dos32)

-=-

Sequence/Type specific constants.. eh ?
constants that are defined within a type declaration, can be used to slice
vars declared as that type only, or to pass as arguments whenever that
argument is declared of that type.

type bit (integer i)
constant ON   = 1,
                OFF = 0

    return i = ON or i = OFF
end type

procedure blabla (bit i)
end procedure

blabla (ON)
puts (1, ON)     -- Error: On is not declared yet!

-=-

Ralf
nieuwen at xs4all.nl

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

Search



Quick Links

User menu

Not signed in.

Misc Menu