The more I think about the "guess" command, the more iffy I am on it.
If I KNOW what is supposed to go there,
then I'm only saving 2 characters on a %tr and I'm losing
explicitness. I'm just having trouble coming up
with a use-case that makes any sense.

* does look nice, but what are we really ~gaining~.

Can someone come up with some examples when the utility of * (or even
the original idea). Like,
"in this situation ____ is easier because _____." But, only examples
that improve both _clarity_ and _efficiency_.
I need these to be compelling problems we run into right now.

-hampton.

On Thu, Mar 6, 2008 at 5:48 PM, Mislav Marohnić
<[EMAIL PROTECTED]> wrote:
> On Wed, Mar 5, 2008 at 9:32 PM, Hampton <[EMAIL PROTECTED]> wrote:
>
> >
> > * If you are debugging, your first step will have to be View Source
> > since you will be unaware of what is being created. Your first
> > instinct is "holy crap it must not be doing the right thing". This
> > slows you down.
>
> I agree with this 100%.
>
>
> > * Nesting partials gets trick, trick, tricky. I can think of many
> > complex examples where tracking this would be a fucking pain.
>
> Well, I never even thought of tracking it across nested templates. It would
> be hard to implement, I guess.
>
> > The only thing I'd consider for "official" syntax is a "GUESS" command.
> >
> > %table
> >  ?
> >    ?.name
> >      Data
> >    ?.value
> >      Data
> >
>
> I like having the "guess" character since it would allow me to build nodes
> without specifying a classname or ID. I never thought of this. I dislike
> using the "?" character, however. I would much rather use asterisk or
> dollar.
>
> %table
>   *
>     *.name Mislav
>     *.age 24
>
> What do you think? Is there a character more appropriate?
>
> Regarding other people disliking this because of "magic": I agree. Giving
> people this behavior is not necessarily giving them power; it can also take
> away power (as Hampton said) and lead to some debugging sessions. Jeff
> Casimir demonstrated this: he thought that SPAN will be generated inside the
> LI, but in fact DIV is generated. While this can educate people on HTML (as
> Eric noted), it can also be frustrating.
>
> Explicitness in programming is not always bad; quite the opposite. In Haml
> templates it leads to readability, which is good. I came up with this idea
> because I wanted to sacrifice explicitness for ease of typing, but maybe the
> trade-off isn't fair. But, because I learned HTML directly from the spec and
> its DTD, I know all the nesting rules by heart and therefore I benefit from
> this "magic". Other developers who never read the DTD may not benefit in the
> same way and will feel uneasy about using the syntax because they will not
> be sure what's being generated.
>
> I don't want to kill off my baby, however. Neither does Hampton or Nathan,
> as they expressed it openly. I'll keep my "html" branch alive and try to
> actually use it, see if I hit some negative consequences with this. Maybe
> I'll also release this as an evil twin plugin for Haml, it is very easy to
> monkeypatch in core Haml.
>
> You are free to pull my branch and play with it. Thanks for all the comments
> and praises.
>
> So how does the community feel about the "guess" syntax (middle of this
> email)? It has more chance of becoming core.
>
>
>
>  >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to