I need some help on this... At present, Felix has classes to make qualified names.
However, the include "file"; feature causes the file to be parsed and the parse tree (actually a sequence of statements) to be inserted at the beginning of the including file. The loss of ordering and scoping is natural, because Felix also has a rule a file can only be included once. The feature is meant for hauling in dependencies not structuring. So given the loss of order you can cut files up at the top level as you please, but you cannot cut classes up, because a class is a single statement. Although classes can be nested this can only be done within a single file. On the other hand I've stuck with the rule that the filename is irrelevant: unlike say Python or Ocaml, it isn't a module or class name. I don't like that because if you get a file that starts to get fat, if you split it up you have to change all the references to it. This means lots of stuff ends up in global scope resulting in hijacking. For example I am factoring "flx" and the library ends up with a lot of top level routines. That's fine if I include only them, but not so good if you want to call "flx" as one of many subroutines. So the actual files have a nice hierarchical structure, but it is not only not inherited into the syntax .. the structure cannot be imposed syntactically. Note also when you use "flx" is builds library "std" separately. This has semantics: it prevents a client program hijacking references inside the library because by the time the client gets the library lookup is done and the names are bound. Using the command line to do this (like Ocaml -pack option) such WORSE than using the filesystem layout (because results depend on command line flags being used consistently). We need a way to provide large scale scopes/namespaces. We cannot do: nameapace fred; include A; include B; because actually A and B will come before the namespace :) However we might do: namespace fred; ... ... and in file A: namespace fred; ... etc, i.e. identify the namespace in each file. A namespace is like an class only it isn't close (i.e. it can be extended as in C++). I once tried to make this work but it didn't work so well ;( -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Get 100% visibility into Java/.NET code with AppDynamics Lite It's a free troubleshooting tool designed for production Get down to code-level detail for bottlenecks, with <2% overhead. Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap2 _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language