in reply to Re^5: finding number of contiguous letters
in thread finding number of contiguous letters

Yes, I could find out, but then that would be assuming that all perl interpreters would behave the same for all os'es, compile options, etc. I try to never assume something in the use of a language, because if it is not specified, then any behavior is acceptable, and per spec. Any programmer that uses undefined behavior assuming it will be consistent, is just wanting bugs. Lisp applicative v. normal orders are an example that come to mind of differing evalution methods, each with their benefits and costs. This is why I was asking if perl the language spec'd list element evaluation order...

Since I was toying around, and since this was lisp-ish, and since eval order would play a huge role in reducing the problem to a tight-lispish-perlish sub, not withstanding the far better solutions via perl's other functions, I was curious if perl did spec eval order, or not...

The question still stands, is there a language spec regarding evaluation order of list elements.

  • Comment on Re^6: finding number of contiguous letters

Replies are listed 'Best First'.
Re^7: finding number of contiguous letters
by blazar (Canon) on May 25, 2007 at 07:57 UTC

    Fair enough++, so you have my apologies if my tone sounded too arrogant. One important point about Perl 5 though, is that it does not have a real spec: it is defined by its own implementation. This is an inconvenience that the Perl 6 crowd are trying to correct. OTOH I'm quite sure that evaluation order is from left to right and was about to paste here the paragraph in perldoc perlsyn saying so. Unfortunately simple searches can't seem to find it and I don't know if it's there at all... and I don't know where else it may be.