On May 12, 2010, at 4:22 PM, Markus Roberts wrote:
Four thoughts:
I slightly favor <~ and ~> for subscription, as => already has
meaning and "~>" looks more like "linked on change" to me. If
that's unpopular, what about "%>" and "<%" or even "-> (sub)" and
"<- (sub)"?
Completely and entirely hate the (sub) bits. Not as sure on the ~>,
as mentioned - can look ridiculous in certain fonts. But I suppose
it's not horrible, and I do like the non-collision aspect, and it will
certainly simplify writing external parsers.
Any other opionions?
Are we missing :OUT_EDGE_SUB intentionally (in which case you should
change your example) or by oversight?
Those two points are related - I just reused the edge type.
Is there any way to keep rake mail_patches from blathering about the
generated code?
Erps. I thought I'd removed that, but I guess that was in a previous
version of the patch.
+1 in general though.
Heh, I've got another version in the works (prototyped but not fleshed
out).
I did a 10 second investigation at some point and concluded that
adding collections to this would be too complicated, but I just did an
11 second investigation (yep, really putting the effort out) and found
it was nearly trivial: Plain code is going to see about 10 new lines.
I'll be pushing that once I've actually written in out, but the
following creates a bunch of edges, like you'd want:
class foo {
notify { b: loglevel => warning }
notify { a: loglevel => warning }
notify { c: loglevel => warning }
notify { d: loglevel => warning }
}
class bar {
notify { 1: loglevel => notice }
notify { 2: loglevel => notice }
notify { 3: loglevel => notice }
notify { 4: loglevel => notice }
}
include foo, bar
Notify <| loglevel == notice |> ~> Notify <| loglevel == warning |>
Of course, this example isn't useful in real life, but if you replace
the 'loglevel warning' things with packages, and the 'loglevel notice'
things with yumrepo instances:
Yumrepo <| |> -> Package <| provider => yum |>
Then it starts to get a bit more useful. :)
--
In theory, there is no difference between theory and practice; in
practice, there is. -- Chuck Reid
---------------------------------------------------------------------
Luke Kanies -|- http://puppetlabs.com -|- +1(615)594-8199
--
You received this message because you are subscribed to the Google Groups "Puppet
Developers" 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/puppet-dev?hl=en.