Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[ feature request /intelligence ]

 [1/5] from: rebolinth:nodep:dds:nl at: 10-Apr-2002 16:56


Hello All, Wondering, How intelligent a Programming language or IOS must be(come) What I expected but did not find: See below the example how intelligent Rebol is?
>> a: b + 1
** Script Error: b has no value ** Where: halt-view ** Near: a: b + 1 =========================================== If would like to see Intelligent action like !
>> a: b + 1
== 1 =========================================== How intelligent could it be? I would expect that a variable not defined could automaticly be assigned. ie -> (a: b + 1) if "b" was never defined then rebol should be able to make "b" automaticly "0" How nice it would be, not to define every time after time local variables and globals ...etc... If rebol is able to make variables automaticly the right value or string or time or etc... We would have a real step into the Intelligent program(ming).. I hope someone could have a tought on this issue also, (R)egards, Norman.

 [2/5] from: greggirwin::mindspring::com at: 10-Apr-2002 11:35


Hi Norman, << I would expect that a variable not defined could automaticly be assigned. ie -> >> It certainly could be, but REBOL isn't designed to do it (though I'm sure they could change it if they wanted to). While that kind of thing can be helpful in building very small scripts, it's also hard to find bugs that can come from that behavior. E.g. you type a name incorrectly but REBOL doesn't warn you, and creates the new word silently. Now your code "runs" but doesn't work correctly. REBOL actually goes further toward "intelligence" than any other language I know in many ways. By that I mean it works in such a way that makes your life easier, and works as expected. I often find when I have a problem and start debugging it, by the time I've eliminated half the code, it works correctly. I just try to make it much too hard. REBOL almost always provides a simple solution. Often times the people on the ML will tell me about a built-in function that does what I want already, or will show me how to do something with 3 or 4 words that I wrote 20 lines of code to do. Just my 2c. --Gregg

 [3/5] from: rebolinth:nodep:dds:nl at: 10-Apr-2002 23:08


Quoting Gregg Irwin <[greggirwin--mindspring--com]>: Hello Gregg, Well your remark is okay, still :-) I.E. a repeat, foreach or an forskip..etc.. also uses a variable automaticly defined using the function.... okay these are comtrolled! Then again i think it indeed would make life even more easier is there was a setting that allows the use of undefined/auto-defined variables in rebol for smaler scripts. Thanks for the reply! (R)egards, Norman.

 [4/5] from: riusa:email:it at: 11-Apr-2002 9:13


I agree with you. If Rebol would automatically initialize words, I cannot be advised if I made a typing error. Furthermore, I tested another good language: Python... it behaves the same way: try this in Python: a=b+1 you will obtain this: Traceback (most recent call last): File "<interactive input>", line 1, in ? NameError: name 'b' is not defined --Alessandro--
> Hi Norman, > > << I would expect that a variable not defined could automaticly > be assigned. ie -> >> > > It certainly could be, but REBOL isn't designed to do it (though I'm sure > they could change it if they wanted to). While that kind of thing can be > helpful in building very small scripts, it's also hard to find bugs
that can
> come from that behavior. E.g. you type a name incorrectly but REBOL
doesn't
> warn you, and creates the new word silently. Now your code "runs" but > doesn't work correctly. REBOL actually goes further toward "intelligence" > than any other language I know in many ways. By that I mean it works
in such
> a way that makes your life easier, and works as expected. I often find
when
> I have a problem and start debugging it, by the time I've eliminated half > the code, it works correctly. I just try to make it much too hard. REBOL > almost always provides a simple solution. Often times the people on the ML > will tell me about a built-in function that does what I want already, or > will show me how to do something with 3 or 4 words that I wrote 20
lines of
> code to do. > Just my 2c.
<<quoted lines omitted: 3>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f Sponsor: VolaSMS, il software pi=F9 completo per inviare e ricevere SMS dal tuo PC Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=276&d=11-4

 [5/5] from: rebol:optushome:au at: 11-Apr-2002 20:07


Languages that do have automatic inintializing usually also have to provide an Option Explicit for testing so that you can find these typo errors. So in the end everyone gets sick of trying to debug hard to find errors caused by typos and turns Option Explicit on all the time, so you are back to where you started. ... In this case intelligence is not a substitute for programmer laziness. Cheers, Allen K

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted