After the earlier brief discussion, I thought about the similarity between this feature and "properties" in Perl 6. I think it would be useful to design the front-end in such a way that it can be re-coded to use properties (mimicing the property syntax of Perl 6 directly is probably not practical without a source filter, and it may change before it sees first light anyway so it doesn't seem worth the effort, unless you want to specifically explore the Perl 6 feature in applied use before it's too late to redesign it).
I don't think the example at the end of your post is a good example. Why must your tuple be crammed into a simple scalar? That looks like the job for an iterator class based on a blessed array of two items, and possibly an overloaded stringize or numify operator.
—John
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|