Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Re: Apocalypse 12

by Juerd (Abbot)
on Apr 18, 2004 at 12:44 UTC ( [id://346095]=note: print w/replies, xml ) Need Help??


in reply to Re: Apocalypse 12
in thread Apocalypse 12

program in a language where the value of an expression changes depending whether there's whitespace between tokens or not.

Like Perl 5?

print 3 . 5; print 3.5; print "$foo{bar}"; print "$foo {bar}";
And more. Still, I think you should not do the yeah-whatever thing. Instead of losing interest, read on to see this part:
And yes, I know certain people hate it. They can write their own grammar.
He means you.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

Replies are listed 'Best First'.
Re: Apocalypse 12
by Abigail-II (Bishop) on Apr 19, 2004 at 07:58 UTC
    print 3 . 5; print 3.5;
    I fail to see your point here. In the first line, there are 5 tokens, 'print', '3', '.', '5', and ';'. In the second line there are 3 tokens, 'print', '3.5', and ';'.

    print "$foo{bar}"; print "$foo {bar}";
    Indeed, and something that doesn't make me very happy. Luckely this is a problem that is usually found by the compiler, assuming you have 'strict' turned on, and don't have a scalar with the same name as the hash.
    And yes, I know certain people hate it. They can write their own grammar.
    Oh, I read that. Do you think that if people start writing their own grammars (of which I haven't seen any indication that it will be anything but hard to get it right) that that will produce maintainable code?

    Abigail

      Do you think that if people start writing their own grammars (of which I haven't seen any indication that it will be anything but hard to get it right) that that will produce maintainable code?

      Yes, I do. (And probably will have a grammar or bunch of macros of my own)

      Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }

        So, on CPAN, we'll get Grammar::Juerd, Grammar::RandomPerlHacker, Grammar::Bleach, Grammar::Pony (might as well move them from ACME::), etc?

        Considering the confusion I've seen after posting a few programming snippets that used the defined-or operator, I don't share your opinion. But time will tell.

        Abigail

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 02:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found