🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #985

Re: Can somebody help with mine too!? I'm desperate!

#985
From: Cannon
Date: Fri, 19 Nov 1999 00:00
88 lines
2337 bytes
The first style you hate, is the one you find in the java JDK source.
I like the first style also since it saves on lines of code in the source
file.
I hate your prefered style since I have the automatic urge to fix-up code
that I copy and paste...

When it comes to lining up, compare the following, having the same body:

Style1:
 try
{
////Sample
            ////Sample
            {
            }
        {
        }
 }
catch
{
////Sample
            ////Sample
            {
            }
        {
        }
            ////Sample
            ////Sample
            ////Sample
            ////Sample
            ////Sample
}
}

Sample2
 try{
////Sample
            ////Sample
               {
            }
           {
        }
 }
catch{
             ////Sample
            ////Sample
                {
            }
             {
        }
            ////Sample
            ////Sample
            ////Sample
            ////Sample
            ////Sample
   }
}


Where do you spot the bracket that is one to many in both samples easier?

> Comment 1 - which will not help you in anyway
> ---------------------------------------------
> Firstly, its well worth making your braces line up.  I personally hate the
Java
> style
>
> try {
> }
> catch {
> }
>
> and much prefer
>
> try
> {
> }
> catch
> {
> }
>
> as I find it much clearer.  That's a personal preference, but which ever
style
> of bracing you choose be consistent about it.  It makes debugging programs
much
> easier.
>
Technical Details
Message-ID: <%A5Z3.292$eR.7765@nsw.nnrp.telstra.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <38217153.BD675400@tig.com.au> <7vs1le$2j5$3@lure.pipex.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,a209a3ce5748943
X-Google-Attributes: gid10d6db,public
From: "Cannon" <wb@nospam.basketball.net.au>
Subject: Re: Can somebody help with mine too!? I'm desperate!
Date: 1999/11/19
Message-ID: <%A5Z3.292$eR.7765@nsw.nnrp.telstra.net>
X-Deja-AN: 550424140
References: <38217153.BD675400@tig.com.au> <7vs1le$2j5$3@lure.pipex.net>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
X-Complaints-To: abuse@telstra.net
X-Trace: nsw.nnrp.telstra.net 942990779 203.35.100.252 (Fri, 19 Nov 1999 16:52:59 EST)
Organization: Customer of Telstra Big Pond Direct
X-MSMail-Priority: Normal
NNTP-Posting-Date: Fri, 19 Nov 1999 16:52:59 EST
Newsgroups: aus.computers.java