So, can anyone tell us what the cost are of using extends? I mean, I'd accept the idea that there's overhead involved in using i.Increase as an extend for using i=i+1, but is this really true? Who's to say the compiler isn't smart enoughto interpret an extend for the code it is shorthand for and skip the overhead of an extra function call?

Ronald Vogelaar
http://www.rovosoft.com

----- Original Message ----- From: "Phil M" <[EMAIL PROTECTED]>


On Oct 12, 2006, at 9:05 AM, Daniel Stenning wrote:

Sure. But it incurs a performance overhead that incorporating it in the language would not. ( unless RS implements the idea of #inline )

I advocate the addition of Inline and/or Macro functions, but who is to say that adding these operators to the language wouldn't also add the same type of overhead? After all Operator_Add and the like are methods too.

I don't buy this "looks more like REALbasic" argument. Sure there are cases where making things more verbose helps in readability, but ++,-- += are so widespread out there in the wider world that I don't see it being beneficial, either for teaching reasons or for productivity or readability. Lets get real, ( scuse awful pun ) most programming students are going to HAVE to learn at least one C style language in their life anyway. And increments are such a common activity it makes sense to provide a quick way of coding it. And future RB shouldn't be limited just to cater for novices etc. There is no reason why the ++ ,--, etc couldn't be left in the RB manuals until later chapters in the manuals. And no one would be compelled to use it.

This is true:  Cocoa, Java, JavaScript and PHP to name a few.

I would prefer that if the ++ and -- operators do get implemented that they would always be a pre instead of the post. There is too much confusion (for newbie and intermediate) with the post operators when they are in a complex statement.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to