develooper Front page | perl.perl6.language.io | Postings from September 2000

Re: RFC 181 (v1) Formats out of core / New format syntax

Thread Previous | Thread Next
From:
Bart Lateur
Date:
September 14, 2000 00:53
Subject:
Re: RFC 181 (v1) Formats out of core / New format syntax
Message ID:
fq01sssumqf7mpf1p7398arsbv1q0k6du3@4ax.com
On Wed, 13 Sep 2000 22:49:14 -0700, Glenn Linderman wrote:

>So who needs a special format type?  Just need a string.  It becomes a
>format when you use it as such...  So just
>
>  my $frm = <<'.'
>@<<<<<<<<<<<<<:  @<<<<<<<<
>$name, $ssn
>.

I, for one, can see two problems with this. And I'm not an expert.

Both are related to the variables.

 1) With a string, there can be no compile-time check on the variables.
If one isn't found, you can, at best, get a runtime error.

 2) What about lexical variables? Suppose that $name is a lexcial
variable. If this format string is interpreted in another module,
there's no way that that module can get a grasp on the lexical $name.

-- 
	Bart.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About