Eu improvements (Part 1)

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

One of my biggest problems with Eu comes when I look at someone's code and
see something like
if atom( base[2][4]) then
    ...


What is the significance of the 4th item of the kind of sequence put into
the 'base' sequence? Does base contain different kinds of sequences, or
a single kind? Does the nature of its contents change with time?

Therefore:
sequence point is  -- define a fixed sequence
        sequence name
        atom x, y
    end sequence
...
    point.x = 0                -- set point's x value
    if point.x > 0 then
    point.name = 3             -- illegal
    point = concat(point, 0)   -- illegal
    mylist[1].name = "!!"      -- can be in a seq.

-- the above opaque example might now be:
   if atom(base[2].location) -- The location of base's second element
-- or perhaps
   if atom(base.values[4])   -- The fourth vale of base


The 'fixed sequence':
1) has named elements
2) cannot have its structure modified
3) contains only data (like any other sequence)
4) may be put in another sequence without losing its
   identity (like any other data)
  
KtB

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

Search



Quick Links

User menu

Not signed in.

Misc Menu