On Fri 15 Sep, Nathan Wiger wrote:
> Michael G Schwern wrote:
> > So indenting the terminator and indenting the text are linked. If you
> > do one, you want to do the other.
>
> As I and many others have said, that's not necessarily true. I like all
> my code to line up, braces, parens, and all. It enhances readability,
> and is easier to scan.
>
> Anyways, it seems both your and my needs could be met if we simply added
> a <<< operator that does what you want. Otherwise we're forced to choose
> between two useful alternatives that are both valid. I could see using
> both your and "my" way in many different situations, so we should make
> them coexistant, not mutually exclusive.
>
There are two current RFCs RFC 111 deals with the terminator - I dont think
anyone is realy debating that at present.
RFC 162 discusses the indenting of heredoc content.
There are two possible operators, the existing << and the enhanced <<<
There are 5 possible ways of indenting, many of them have no compatibility
problems, some might and hence might benefit from the <<<.
a) No Indenting (status quo - do whatever the current << does.
b) Remove all leading whitespace - Not popular - no longer supported
c) Remove whitespace equivalent to the first line - Not popular - no
longer supported
d) Remove whitespace equialent to the smallest whitespace - a Realistic
option
e) Remove whitespace equialent to the terminator - a realistic option.
Do the following two options satisfy everybody? [no but its worth a try]
1) << removes whitespace equivalent to the terminator (e) this is largely
backward complatible as many existing heredocs are unlikely to have white
space before the terminator.
2) <<< removes whitespace equivalent to the smallest whitespace (d)
or are these the options that will satisfy everybody [no but its worth a try]
1) << Does just what it does now
2) <<< implements (d) or (e)
[[there is still the tabs debate however]]
Richard
--
[EMAIL PROTECTED]