Fair enough, I was never set on '$', perhaps '^' makes some sense.
Sure you could:
=require 'foo'
but wouldn't
^foo
(or ?foo or λfoo)
be more hamlish?
On Oct 23, 2:39 pm, "Bradley Grzesiak" <[EMAIL PROTECTED]> wrote:
> Even if this feature were to be included (I'm kinda on Chris' side anyway),
> it ought to use a different control character than '$'. I can think of
> plenty of times when one would want the first character of a text node to be
> a dollar sign. This is a good reason why the '%' is such a good control
> character... who starts off a piece of text with that character?
>
> And besides, if you want to decouple it from Rails, wouldn't "= load" or "=
> require" work just as well?
>
> %p
> Just my
> %b
> $0.02
>
> :brad
>
>
>
> On Thu, Oct 23, 2008 at 2:32 PM, Lex <[EMAIL PROTECTED]> wrote:
>
> > The primary advantage isn't syntactic. How I see it is that a designer
> > who knows HAML, but not Ruby could create components out of partials
> > without having to write any Ruby code. It also adds functionality when
> > using HAML apart from Rails w/o having to roll your own helpers
> > framework. This would help to further decouple HAML from Rails and
> > encourage its use in other environments. There is also a clear
> > syntactic advantage over:
>
> > = render :partial => 'foo'
>
> > which would become
>
> > $foo
>
> > On Oct 23, 12:14 pm, "Chris Eppstein" <[EMAIL PROTECTED]> wrote:
> > > -1 There's no syntactic advantage here over helpers.
> > > = calendar(:month => 'January')
>
> > > = datagrid(:data => @my_hash, :sort_by => 'date', :order => 'asc')
>
> > > -chris
>
> > > On Thu, Oct 23, 2008 at 8:05 AM, Lex <[EMAIL PROTECTED]> wrote:
>
> > > > First off, I just wanted to say Kudos to Hampton Catlin (and everyone
> > > > else involved) for creating HAML, it's the first templating language
> > > > that I've actually liked. Super easy to learn too, I'm in looove!
>
> > > > BUT...
>
> > > > I think it could be made better...How about this:
>
> > > > $component{ :localvar => @vartobind }
>
> > > > Some J**a-based templating systems use this idea (groovy/gsp, and jsf/
> > > > facelets/jsp) to compose templates out of partials, though they use
> > > > the xml namespacing method (i.e. <taglib:tag attr="value" />)
>
> > > > I think this is a great way to make templates more DRY, it allows
> > > > partials to be extracted, reused, and distributed as components, and
> > > > it discourages use of inline code in a template. A backing class could
> > > > be attached to a partial to aid in complex logic.
>
> > > > Some ideas:
>
> > > > $calendar{ :month => 'January' }
>
> > > > $datagrid{ :data => @my_hash, :sort_by => 'date', :order => 'asc' }
>
> > > > What do you all think?
>
> --
> Bradley Grzesiak
> [EMAIL PROTECTED]://toleoandbeyond.blogspot.com
>
> * You have received an email from my personal account. Please do not divulge
> this address to any website (eg: evite, shutterfly, etc). I have another
> address for such uses; please ask me for it.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---