Re: procedures calling procedure calling procedure...
- Posted by Derek Parnell <ddparnell at bigpond.com> Oct 15, 2002
- 379 views
----- Original Message ----- From: <francis at gmx.co.uk> To: "EUforum" <EUforum at topica.com> Subject: Re: procedures calling procedure calling procedure... > > Cunning? Well, you can define routine ID constants/variables at the top of the > file, reference them in the middle and set them at the end. I guess my main issue is that it is not so much that "you can define..." but that you *must* do that. We don't have freedom of choice on this issue. The current design of Euphoria forces us to do that that way. In this sense, Euphoria (like many others) is not a general programming language. It is an expression of a programming philosophy. I just wish Euphoria was not quite so doctrinal because it is such a great language. I'm probably in the camp of users that also believe that it can be even greater yet. For example, even though I actively campaign against the use of GOTO, I would allow it in a language so that people could choose NOT to use it. Of course many would use it, but that is a problem of their own making. Personal Responsibility. > Even in C, it is ordinary programming practice to > "#define function(parameters);" if it is called > before it is instantiated. But it is not mandatory. Its main purpose in C/C++ is to allow the compiler to perform some validation, at compile time, of the usage of routines and to allow it to generate the correct code for return values (without having to do an extra pass). >It would be slightly more convenient to be able to > call *before* it is defined, but we are talking about an interpreted language! In > terms of coding, I think is is not too much work around at all. There are other interpreted languages that all forward referencing. The reason for Euphoria's inability to do this is not because it is an interpreted language, but because either RDS thinks that it is good for us, or that it was easier not put it in. Of course this is speculation and may very well be wrong. Robert, why is forward referencing not included in Euphoria? ---------------- cheers, Derek Parnell