Re: Euphoria Interpreter design

new topic     » goto parent     » topic index » view thread      » older message » newer message

First.  Off the subject and out of the way.  I like the online listserv's
Cute buttons but I wish that they also had text to let you know what button
does what.   Not everyone knows to look at the status bar.

NOW:  My on subject message is simple.  THANK YOU ROB.
I agree.  There are many cases where define-it-before-you-use-it
is a problem, a burden, a real annoyance, a trouble maker, a pain
in the tush.  But, It makes it much easier to read SOMEBODY ELSES
CODE,  AND your own code many months or years down the road.

I also agree that routine_id() is a very dirty way to get around
the burden of define-it-before-you-use-it. But, I again agree with
Rob, It alerts later code readers that they are dealing with code
that doesn't fully fall under the define-it-before-you-use-it law.

Better design:  I know that it would break some code.  (IE: probably
Neil.) But,  I hate the ability to redifine built_ins.  I just hate
the idea of being able to redefine functions/procedures all together.
I feel that it (muddies the water) makes the code difficult to follow.
Code Example:
  without warning--HIDE the fact that I'm screwing with someones mind.
  function getc(object faked)
    faked = faked--Pretend to use the input
    return rand(257) - 2
  end function
  with warning
Now you have completely destroyed what getc() is suppose to do.
What is expected to happen, doesn't happen.  I realize that the
idea is to allow programmers to do some behind the scenes magic
so that the code runs ENHANCED (faster, cleaner, and/or more flexible).

I also feel that routine_id() should be able to used on built-ins.
As of right now the only way to do that is by doing the NO-NO above
(redefining the built-in).
Code Example:
  without warning--HIDE the fact that I'm screwing with someones mind.
  function getc(object temp)
    return getc(temp)
  end function
  with warning
  --getc() is now redefined so that routine_id() will work.

I see this nonsense as a (Kludge, foobar, NO-NO, bad design).

    Lucius L. Hilley III
Just my $0.04 worth.  Sorry I overpaid 8^)



On Wed, 24 Feb 1999 15:28:21 -0500, Robert Craig <rds at ATTCANADA.NET> wrote:

>Ralf writes (regarding "define-it-before-you-use-it")
>> He doesnt have to proof it is bad. He (or any one else, persons
>> should not be association to opinions in a discussion) has
>> to prove that there is at least *one* case, where not linear order
>> would be slightly better, and it is proven we're better without
>> than with the restriction.
>
>I hate to sound like a lawyer Ralf, but I think the burden of proof
>is much higher than what you propose.
>
>I'm *sure* there are many cases where some programmer-defined
>order will be "better". The point is that Euphoria's
>define-it-before-you-use-it order is *machine-verified*.
>A arbitrary order invented for each program by an artistic
>programmer is *not* verifiable, and therefore can't be trusted
>to have any consistency, by others, or (eventually) even by
>the programmer himself.
>
>Knowing that define-it-before-you-use-it is *enforced* for all
>Euphoria programs, makes it easier to understand and maintain
>other people's code, and probably your own as well.
>
>The routine_id mechanism lets you call things that come later,
>but you can clearly see in the code that a special call
>(call_proc, call_func) is being made, so you are alerted to
>what is going on. A user-defined symbol can never appear
>in the source code before it is declared.
>
>Regards,
>     Rob Craig
>     Rapid Deployment Software
>     http://members.aol.com/FilesEu/

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu