RE: include paths
- Posted by bensler at mail.com Mar 17, 2002
- 378 views
> >The complete solution would also incorporate relative paths. It just > >seems odd not to have them. It's the same as the syntax we have now, but > >using relative path notation. > > Example? EG. include .\libs\mylib.e -- only search for mylib.e in libs\, which exists in the current directory. I could then ship ExoticaX with the library files in their own directory, separating them from the examples. > I agree whole-heartedly that a language should have convenience > features. > On the other hand, a language like Perl includes so many 'conveniences' > that it becomes write-only. I am of the same mindset. While I like the conveniences, they aren't priorities, and generally cause more clutter and loss of productivity than they are worth. I have chosen those 2 as examples of, like you said, "dead simple" features that could be implemented, and don't detriment the simplicity and readability of the language. Each of those features I mentioned, I have implemented in my current version of EUPP. Along with vertical slicing, function slicing, OOP style conversion (works with my custom OOP lib, and with objecteu), namespacing (obsolete now), s[0] equates to length(s) (s[1-1] doesn't). It will also rearrange code so that definitions appear at the top of routine blocks. I was working on adding eval(), but that requires writing an interpreter on top of my parser. I'd still like ot do that one. >Already, the few changes I have made > allows code like: > ----------- > constant ,home = "E:" > ,fname = "foo.txt" > > include (home) \src\ (fname) > > function foo (,sequence s) > sequence ,t = "abc" > ,u = append (t, s[2..]) > .. > end function > ---------- > While I like it, it does begin to look like a different > language. > Keep up the good work Karl. I only wish I had the knowledge to be able to implement my wishes into EU. I think your syntax for dynamic inclusion is over complicated. The form that I recommended cleary differentiates between an absolute definition, and a dynamic definiton. There is no need to mingle the two forms. In fact, there is no need for the original form, except backwards compatability. using my syntax, you would have include( home &"\\src\\"& fname ) Chris