Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Simplifying the syntax further

by Aristotle (Chancellor)
on Nov 22, 2005 at 16:48 UTC ( [id://510851]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Simplifying the syntax further
in thread Embedding a mini-language for XML construction into Perl

That doesn’t look like a useful addition. The user still has to understand the edge case and know when to apply empty manually, but the cost of learning new syntax for it is not amortised, since it offers nothing over saying undef; explicitly.

For the case of br and hr, the better solution would be to declare them as empty elements. (Then you could also warn/die if the user accidentally does call text or an element constructor.)

Of course that still won’t help when the user wants the occasional empty td. I see no way to handle that without manual intervention, though, so there might as well be no magic for it at all. Magic must be transparent to earn the name; if it’s not, it just adds extra cost.

Makeshifts last the longest.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://510851]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2024-04-19 17:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found