Loading ...
Sorry, an error occurred while loading the content.

14548Re: [JavaScript] object oriented javascript quiz

Expand Messages
  • khing2
    Nov 10, 2006
      --- In JavaScript_Official@yahoogroups.com, "Jonas Raoni"
      <jonasraoni@...> wrote:
      > On 10/26/06, Jayasurian <jayasurian123@...> wrote:
      > > i didnt get . whats the problem with "eval"? can we use any other
      > > instead of eval??
      > >
      > > can you explain?
      > "eval" is quite slow and for me it's just a synonym for lack of
      > knowledge in the language, it has a specific use which is *parse
      > javascript code*.
      > A good analogy can be: it doesn't make sense to program in pascal and
      > inside your code insert a eval("pascal code"), since you could do it
      > with the language itself.
      > Well, if you doubt, try to show me a small code snippet where you
      > can't remove the "eval". It's acceptable only if your user can insert
      > code.
      > --
      > Jonas Raoni Soares Silva
      > http://www.jsfromhell.com

      First of all it would be nice if you would follow your comments with
      some useful information. I must thank you for point out the eval.
      Although you are not correct about the use of eval i did notice that
      my use of the eval in that situation was not necessary.

      The script will work the very same way if you removed the eval and
      left the statements in place.

      when asked to explain what you should have said was this....

      There is no need to eval the element of the array which is the result
      of the paramater expressions in the eval statement because, The
      element in the array os already a valid pointer to the object.

      Lastly saying that its all badly written code.....It would be nice if
      you would provide a more useful response other than your
      sensationalism. Its easy for someone to say that this is crap! Ask
      them to say how it is crap and they get quiet.

      I pose a challenge to you to write an app with the very same
      functionality without the badly written code and post it here for us
      to compare.
    • Show all 10 messages in this topic