Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Apocalypse 12

by hardburn (Abbot)
on Apr 19, 2004 at 13:27 UTC ( #346283=note: print w/ replies, xml ) Need Help??


in reply to Re: Apocalypse 12
in thread Apocalypse 12

When I heard of your whitespace issues with Perl6 in earlier Apocalypses, I thought you were over-reacting. But after reading Apoc. 12, I'm ready to jump on board (though perhaps not with the same vigor).

Though I've never seen a language that is completely free of whitespace restrictions, it's usually because the designers could only go so far in getting rid of it. I don't like seeing it put intentionally into a language.

(Perhaps my only exception is OCaml, where function parameters are seperated by whitespace. You've got to seperate them with something, and I don't think making the choice between seperating with 0x20 instead of 0x2C is a big deal. I haven't used it enough, though, to see if it makes a difference in real code.)

----
: () { :|:& };:

Note: All code is untested, unless otherwise stated


Comment on Re: Re: Apocalypse 12
Download Code
Re: Apocalypse 12
by jonadab (Parson) on Apr 27, 2004 at 14:02 UTC
    Though I've never seen a language that is completely free of whitespace restrictions

    I have. But such languages invariably have much simpler syntax than Perl. In most cases they're oddball languages created for hack value that advertise Turing-equivalence as an important feature and have never been used (or intended) for anything serious.

    As far as real languages, Perl5 has fewer and more reasonable whitespace restrictions than average I think. I do wish we had whitespace-folding multiline strings like in Inform (but not at the expense of regular strings). I believe Perl6 will allow such a syntax to be added to the grammar without having much impact on anything else (provided the syntax for it is carefully chosen to not conflict), which will be nifty. Some of the languages in the lisp family are pretty reasonable about their use of whitespace too. You do have to have whitespace between items in a list, but it makes no difference how much whitespace or what kind, and the restriction is unlikely to bother anyone since the whitespace is not redundant: it's the only syntactic element between items in a list. (Usually the syntactic feature that bothers people about these languages is the pervasive use of parentheses, especially if said people aren't accustomed to using an editor with paren-matching, auto-indentation, and sexp-based cursor navigation. Perl goes the other way and allows you to use a lot fewer parentheses than many other popular languages, and I think this is going to stay mostly the same in Perl6.)


    ;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2014-12-26 01:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls