Re: Re: Re: Please VOTE! Changing keywords to functions
Mukhsein Johari <[email protected]> Fri, 30 Jul 2004 09:11:38 +0100 (BST)
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <[email protected]> |
--- Mark Hahn <[email protected]> wrote: > Mukhsein Johari wrote: > > --- Mark Hahn <[email protected]> wrote: > > What about yield? Is voting on that closed? I'd [snip] > do what it does in > Python for generators, but it does so as part of a > much bigger overall > flexible co-routine scheme. Ah, I forgot about this. Sorry about that. > The good news is you can say "return(arg)" and it > will work fine. I did > that for years in C before I found out I didn't need > the parens. :-) Uhm...I never actually found that out about C. Till now. :-P > > I think that you want to keep things such that the > > programmer of a prothon program (either original > or > > newly recruited) can quickly make sense of things > > instead of having to check if things like raise > and > > yield in that program actually means what he > thinks it > > does. Keywords give you that sense of certainty. > > I don't agree. You have to check what keyword > actually means just as much > as a function. > Perhaps you've misunderstood what I said. Let's see if I can say it in a better way. If you've learned the language and mastered the basics, you don't have to look up the exact meanings of keywords anymore (as long as the keyword list is not too long, that is) because you're used to them. You remember them. raise, continue, while all do what you expect them to. With functions, this is no longer true, because the (original) author who wrote the program you're currently looking at may have changed the meaning/behavior of that function from its default. Like my 'dangerous' example in the last post. So, to be safe, you will have to go digging through all the source to see if that was, in fact, done. Which, I'm sure you'll agree is quite a bit different from looking up the prothon docs! (speaking of which, thanks for putting up the index/toc for the tutorial!) So like I said, you want to be careful about the keyword<->function decisions. ________________________________________________________________________ Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now http://uk.messenger.yahoo.com/download/index.html