Re: type string to Dan

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

At 07:54 PM 12-03-1999 , you wrote:
>Dan I am talking about using assembler written Euphoria.

You mean embedded machine code poked to memory and called from your
Euphoria code (in fact you can't even call it assembly... it ain't assembly
language, pure machine code). Yes I understood that Bernie.

And there are other problems from your proposal. We don't know the internal
structure of sequences (how they are stored in memory), and will never
know... each implemetator of the language is free to do it their own way.
So a hardcoded-machine-language solution will be unable to directly support
Euphoria's sequence commands (concatenate, append, prepend, slicing, etc.).
You'll also run into trouble if you try to subscript such a string using
brackets... Euphoria doesn't support operators overloading.

Coding such a string "type" wouldn't be a real type, just a propietary way
to store data in memory and would be a waste of time, IMHO.

Things would be different if we were able to know the memory address of the
sequence, it's length and how Euphoria data types are stored... then a
machine code routine could "scan" the memory block for incompatible data.
As you see it would be much easier and efficient if the language
implementator (in this case RDS) createas such function.

A useful runtime routine for future Euphoria releases would be:

sequence_depth() -- Returns sequence max depth (morphologically)

It's useful not only for the string issue. I can imagine several
optimizations for b/2-3 tree data structures, I can make databases leave my
head :P


Regards,
         Daniel  Berstein
         [daber at pair.com]

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

Search



Quick Links

User menu

Not signed in.

Misc Menu