RE: When will Eu be updated again and more

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

Another idea besides naming prefixes by the filename might be to
name the prefix within the file where the global var originates,
by creating a new keyword, say, 'external_global_prefix' (or whatever)
so that you can name the global prefix separately from the filename.
This would also make it easy to change the prefix if needed later on.

For example:

  "file1.ew" contains:
      external_global_prefix="ClassA"
      atom x,y
      x=3 y=4

  "file2.exw" contains:
      include file1.ew
      atom a,b
      a=ClassA.x
      b=ClassA.y

I would prefer this over using the e/ew filenames themselves, as
that would make it VERY difficult to change a files name.  In my
opinion, the naming of a file has to remain very flexible.
Although it is true the filename often links to the code itself
i think its too much of a constraint to force it; there are times
when it would be too hard to change the filename.  The best example
is when you write a child 'class' within a file, and you want to use 
that code over again in the SAME project, as a new child class, by
altering the class slightly to fit the second task, and renaming the 
file.  Suddenly all the global vars cant be accessed external to
the file using the same parent class because all the external global 
references in the parent are still naming the original prefix.  This
means all the global var accesses in the parent have to be altered.
On the other hand, if it only means changing one statement in one file 
such as 'external_global_prefix="newname" '
i think its something you could easily do by hand, or with an ide
geared for the new code techniques.

It certainly deserves thought.

--Al

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

Search



Quick Links

User menu

Not signed in.

Misc Menu