Man, why do I always have to be a party pooper?
Ok, so first off. Fucking A+++++ on unique thoughts. This is probably
the most interesting idea I've heard in a long time. And its a really
interesting extension of what Haml is meant to do and the ways it
makes you think about the documents you are creating. So +100 points
to Mislav for being super-smart.
However, I am pretty solidly against this being default behaviour in
Haml. I shall list the reasons!
* Remembering and figuring out context takes too much brain power.
Having to look up and figure out why something is happening takes too
much time. The programmer should have more power.
* 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.
* Nesting partials gets trick, trick, tricky. I can think of many
complex examples where tracking this would be a fucking pain.
* Muddles your assumptions
* Behaviour changing without notice is unnerving.
* Too much "magic" is frightening to programmers.
The only thing I'd consider for "official" syntax is a "GUESS" command.
%table
?
?.name
Data
?.value
Data
I'm just not sure how useful it is. I feel like I want to say "Yeah, I
KNOW what I want there... duh"
Another possibility is building this as an optional pre-parsing.
Install the magic-haml plugin and all templates get put the the ringer
of this magic. That way, core-haml can just focus on what-is-seen....
and the magic can be contained in its own project.
Just my two shits.
-hampton.
PS: I like the line of thought though. I'm still up for convincing.
On Wed, Mar 5, 2008 at 2:37 PM, Jeff Casimir <[EMAIL PROTECTED]> wrote:
>
> Mike,
>
> I would think...
>
>
> %ul
> .a yo
> .b sup
>
> Would translate to...
>
>
> <ul>
> <li class='a'>
> yo
> <span class='b'>
> sup
> </span>
> </li>
> </ul>
>
> Since I don't think a DIV can just be inside a UL.
>
> - Jeff
>
>
>
> On 3/5/08, ratbeard <[EMAIL PROTECTED]> wrote:
> >
> > I'm pretty sure from the pastie code snippet this is how it works, but
> > just to be sure:
> >
> > %ul
> > .a yo
> > .b sup
> >
> > would compile to:
> > <ul>
> > <li class='a'>yo</li>
> > <div class='b'>sup</div>
> > </ul>
> >
> > That is, the implicit tag inside of a 'li' would be a 'div'? This
> > kind of nested implicit tag might take a little longer for your brain
> > to process while reading the code, but who knows, maybe it will become
> > second nature and you'll start to think about the document structure
> > more instead of relying on explicit tags. And of course, you can
> > always be explicit if you want to :)
> >
> > I think it looks very cool and look forward to trying it out.
> >
> > Mike
> >
> >
> > >
> >
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---