Re: Re[8]: More accurate compiled file names

Antony Dovgal <[email protected]>
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
On Mon, 31 May 2004 18:59:23 +0400
Dmitry Koteroff <[email protected]> wrote:

> >> Why  should I pay for something if I can get the same on the next
> >> street corner? I don't understand.
> AD> Because Smarty is not intended for parsing PHP-code.
> Sorry,  you have not answered the straight question. You just say
> something  like  this:  "if Bill Gates do not like ice-cream, you
> should not intend to eat an appricot."

on which question should I answer?
the question about street corner? or about appricot? oh, wait, it was
Bill Gates...
  
> 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.

We should give deleloper possibility to forget about compiled templates
at all.
And you (finger's on you, yeah) are trying to align machine code.

I'm trying to explain you, that there can be much more
convinient ways to debug templates, then using compiled templates for
that.
Got it? 

> >> (Maybe with concatenating crc32() result in addition, no matter).
> >> Why not? Can you motivate that?
> AD> Just because compiled template is generated by machine and for
> AD> machine. User/developer should look into it's code.
> Again, i's not an answer to the question.
> Seems you do not understand the roots of the problem totally.

I just wanted to say this.. =)
 
> 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?
Could != Should 
I could jump off the roof, but should I ?

> AD> Please, don't juggle with my words. I didn't say that.
> But I did say. (-;
Glad for you.
 
> AD> If you're so masochistical - you may continue to dig
> AD> machine-generated code, thinking it's the best solution.
> I  do  not like to dig the "machine code" (apropos, people in the
> neighbor  topic in this conference say that they want to dig it).
People may be wrong =)
(and I can be wrong, wow =) )

> 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. (-;

Ok, let's stop here.
Imagine such situation: Smarty handles most of possible errors
correctly. And you don't have to look into compiled code to learn what
happened.
Is there some real need to dig compiled templates?

> 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.

no error -> no message -> no need to handle
 
> 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?
That's what I'm trying to say!
Smarty should handle correctly such situations (if it can do so, of
course).

> 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.

Well, I'm really tired to repeat things twice and more, but I'll do it
for you: Smarty knows only about templates. And we're talking about
errors in templates. 
Please, forget about {insert}'s and {php}'s - Smarty can do nothing with
them. 

> Sorry of my question, but how long do your programming in PHP and
> use Smarty (approximately)?

Rather strange question. Especially for you imho.
PHP - more than 4 years.
Smarty - about 2.

Are you satisfied ?
 
> 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.

Ah. And I thought you're just don't know what you really want. I was
wrong, probably.

> 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. (-;

Maybe you need to read this:
http://smarty.php.net/manual/en/chapter.debugging.console.php ?
 
> 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).

So, this letter was just my imagination:
http://lists.php.net/article.php?group=php.smarty.dev&article=2319 ?  

> Seems we are talking about completely different things.

Perhaps, you're right =))
 
> AD> I'd choose a debugger and you're trying to make the machine
> AD> code more readable.
> Noone can choose non-existed tool to use it. (-;

see above.

---
WBR,
Antony Dovgal aka tony2001
[email protected] || [email protected]

-- 
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.