Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Re: Re: Re: Re: CGI::Application vs CGI::Builder

by Anonymous Monk
on May 04, 2004 at 12:54 UTC ( [id://350313]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Re: Re: CGI::Application vs CGI::Builder
in thread CGI::Application vs CGI::Builder

I think the real problem is beginning with semicolons. Sure, you *can*, but it gives the (false) impression that a semicolon is a statement beginner when it's really a statement terminator.

Well, since this is a well formed block made of 3 'statements':

{ A ; B ; C }

I would say that perl uses semicolon to divide/split statements, more as a 'statement separator' than 'statement end' (i.e. neither to end nor to start statements).

I agree that putting the semicolon at the end is the more popular convention, (and for this reason my style is unconventional), but these are exactly the same block, just splitted after or before the 'statement separator':

{ A ; B ; C } { A ; B ; C }

the advantage of the latter is the vertical alignment, its disadvantage is that it is unconventional.

Domizio Demichelis

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: Re: CGI::Application vs CGI::Builder
by BUU (Prior) on May 04, 2004 at 21:55 UTC
    I would say that perl uses semicolon to divide/split statements, more as a 'statement separator' than 'statement end' (i.e. neither to end nor to start statements).
    I'd have to disagree here. You can still end that last statement with a semi-colon (I would consider it good practice to do so infact, much like commas in list assignments), but perl manages to guess where you have omitted the statement ender. I see the semicolon much like a period in english. If you looked at a improperly spaced sentence, you could come to the conclusion that a period starts a sentence, because "most of the sentences have a period in front". But of course, a period ends a sentence =].

    Since this is a matter of personal style, aka opinion, it's kind of pointless to try to change your mind or you change my mind, I just wanted to reply with my view point, which I'll reiterate to try to make myself clear: A semicolon *ends* a statement. It tells perl "this is the end of my statement". Therefor, it belongs at the end. =]

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2024-04-24 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found