Re: is return a function? [was ugly CVS subject]
| From: | Philip Olson | Date: | Wed, 11 Jun 2003 19:02:52 +0000 |
| Subject: | Re: is return a function? [was ugly CVS subject] | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969354413@lists.php.net to get a copy of this message | ||
On Wed, 11 Jun 2003, Gabor Hojtsy wrote:
> >> <function>return</function> is how it's done, just like
> >> <function>include</function>, <function>print</function>, etc.
> >
> > Yet, return is not a function, unlike include or print.
> >
> > <literal> could get a link to the anchor in the doc to return.
> > same would apply to continue and break, while, for.....
> >
> > That is more consistent.
> > What do you think?
>
> We can easily make <literal>return</literal> to point to the return
> functions docs in XSLT, it's quite easy. But I don't know if someone
> would do that for DSSSL and still <literal> is not meant for language
> keywords. So if you would like to find something better then <function>
> I would not support <literal>. There is probably some other tag more
> suitable here...
>
> I tried to look up some more appropriate tag here for return and the
> like, but was unable to find one. Literals definitions is: "A Literal is
> some specific piece of data, taken literally, from a computer system. It
> is similar in some ways to UserInput and ComputerOutput, but is somewhat
> more of a general classification. The sorts of things that constitute
> literals varies by domain." This does not fit things like return. A
> language keyword is not a <literal> IMHO, it is more a <function>,
> especially if it looks like a function, and can be used like a function.
I agree, use of <literal> here is not the way to go. I don't
see anything wrong with <function>, we use it with other
non-functions like include, print, unset, etc. And, return
can take on () so that's not a problem either. Constructs
are pretty much like functions, the tag works well.
Regarding the the other stuff, like break/for/while... We
could create a new tag or simply use <link>. I don't mind
just using <link> for these.
Regards,
Philip