Re[10]: More accurate compiled file names

Dmitry Koteroff <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
>> AD> Well, the most bad thing imho - it's to make developer
>> AD> to look into compiled templates.
>> AD> That's what I'm talking about.
>> Agree.  But  WHO  makes  (makes!) developer to look into compiled
>> code? Please stick a finger to them.
AD> We should give deleloper possibility to forget about compiled
AD> templates  at all.
Unfortunately it is impossible (at least before PHP's eval is not
grown up from the baby pants).

AD> And  you  (finger's on you, yeah) are trying to align machine
AD> code.
Oh,  really? (-; I just align compiled template FILENAMES in this
thread, not a machine code.

AD> I'm  trying  to  explain  you,  that  there  can be much more
AD> convinient  ways  to  debug  templates,  then  using compiled
AD> templates for that. Got it?
Of course, I agree with it from the beginning. But stop, have you
read  the  neighbour thread? I am writing there about line number
synchronization.

>> Text "generated for machine and for machine" could be readable by
>> human  too.  And  if  I should not pay for that and even must not
>> loot at them more often than before, why not?
AD> Could != Should 
AD> I could jump off the roof, but should I ?
But  what  would  you  say  if  the  President  modify the law to
prohibit roofjumping for all the people in the world? It's silly.
(-;

I  just  want  to say, that if we can do something better with no
pay  for  it  (at  all - no pay!), but with possible benefits, we
should do it.

>> But  I do not like to cry tearing my hears when I cannot find the
>> buggy template much more. So I choose to dig instead of tear. (-;
AD> Ok,  let's  stop here. Imagine such situation: Smarty handles
AD> most of possible errors correctly. And you don't have to look
AD> into compiled code to learn what happened. Is there some real
AD> need to dig compiled templates?
No.  But  there  is REAL need to detect full source template name
(no  any  words  about  compiled  code at all, eh?) on unexpected
fatal error.

>> AD> Just  think  about it - your templates with lots of empty() &
>> AD> isset() will be really pain in the ass.
>> Agree.  But E_NOTICE is not just a lot of isset(). You are mixing
>> three  independent  entities in your mind - the error itself, the
>> error diagnostic message and tools to handle errors. No good.
AD> no error -> no message -> no need to handle
"Every program has at least one error."
(seems, Knuth).

You may disable message, but you cannot disable error.

>> And  one  more. E_NOTICE is not the only message which is handled
>> at  runtime.  We  also have E_WARNING. Do you offer to disable it
>> too?
AD> That's what I'm trying to say! Smarty should handle correctly
AD> such situations (if it can do so, of course).
Smarty  should  make  all  the people in the world happy! Please,
modify its code to achieve this. (-;

>> What  about  code  which  is called from inside the template (for
>> example, user-defined functions)? If I disable E_NOTICE, it would
>> be disabled in these functions too.
AD> Well,  I'm  really tired to repeat things twice and more, but
AD> I'll  do  it  for you: Smarty knows only about templates. And
AD> we're talking about errors in templates. Please, forget about
AD> {insert}'s and {php}'s - Smarty can do nothing with them.
Thanks. (-;

>> Sorry of my question, but how long do your programming in PHP and
>> use Smarty (approximately)?
AD> Rather strange question. Especially for you imho.
AD> PHP - more than 4 years.
AD> Smarty - about 2.
AD> Are you satisfied ?
Not  satisfied - just astonished. (-; And all this four years you
programming  without  E_NOTICE  and do not differ error and error
message? Strange.
 
>> AD> but we can TRY to handle most of them.
>> AD> Btw, why you're changing examples all the time?
>> To  motivate  why  do  we  need human-readable NAMES for compiled
>> template filenames.
AD> Ah. And I thought you're just don't know what you really want.
AD> I was wrong, probably.
Maybe  I  don't  know that I want, but I have a patch which works
and which is very useful in practical situations. (-;

>> AD> Because you're trying to make easier the process I don't want at
>> AD> all. When your C program fails - are you digging the machine
>> AD> code or maybe starting up a debugger?
>> If  somebody would write a debugger for Smarty, I will use it, of
>> course. (-;
AD> Maybe you need to read this:
AD> http://smarty.php.net/manual/en/chapter.debugging.console.php
How  do you plan to use debugging console on E_ERROR raising?
I can use C debugger (gdb, for example) to debug crushed program.
 
>> And  -  why  are you talking about "machine code"? Where is it? I
>> have  only  said about FILENAMES - to simplify detection of buggy
>> SOURCE  template,  NOT  machine code. I must not to open compiled
>> template  at  all  - I will be satisfied only for its name in PHP
>> fatal  error  message. Then I will go directly to SOURCE template
>> and  correct  it  (line  number  I  already  have - see neighbour
>> thread).
AD> So, this letter was just my imagination:
AD> http://lists.php.net/article.php?group=php.smarty.dev&article=2319 ?
And?  Working  with  source  template,  not compiled, when we got
error  message  (E_ERROR or E_WARNING - no matter). The letter is
about that. (Glad to see that you have read this.)

-- 
Best regards,
  Dmitry Koteroff.

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.