Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Brace Style/Position

Name: Anonymous 2011-10-15 6:05

Java convention states:

Open brace “{” appears at the end of the same line as the declaration statement.
The opening brace should be at the end of the line that begins the compound statement; the
closing brace should begin a line and be indented to the beginning of the compound
statement.

>Like this

public class Zelda {
   //statements
}

>NOT LIKE THIS

public class Zelda
{
   //statements
}

Fuck people, put the opening brace on the same line as declaration statement. Is it really so hard?

Source: http://www.oracle.com/technetwork/java/codeconventions-150003.pdf

Name: Anonymous 2011-10-17 14:43

>>38
Discussing the development of the following:
* Valeat Res Magis: FrozenVoid's Web Browser.
* /prog/OS: A revolutionary Common Lisp-based OS.
* Nordlige Project: A curtain fire shooting game featuring magical viking boys in the fantasy land of Asgard.

Name: Anonymous 2011-10-17 14:49


'>2011
'>Taking FrozenVoid seriously

Name: Anonymous 2011-10-17 20:39

>>41
Lisp sucks dicks.

Name: Anonymous 2011-10-17 20:55

class Anus {

    int width;

    void prepare() {
       
        width *= 2;
    }
}

Name: Anonymous 2011-10-17 21:06

>>44
+1

Name: Anonymous 2011-10-18 0:43

>>42
FV is worth taking just as seriously today as he had been years ago. On the other hand, he hasn't posted in years so I'm not sure what you're talking about.

Name: Anonymous 2011-10-18 1:08

class fuckOff // {
 {

   System.out.println("Is it really that big of a fucking deal");

 }

Name: Anonymous 2011-10-18 10:01

>>47
fail

Name: Anonymous 2011-10-18 11:09

newlines are for newfags only

Name: Anonymous 2011-10-18 14:54


#define { }
#define } {

function idk() } some code {;
function next()}

....

{

function nextnext()
}

....

{


}━━━━━━━(゜∀゜)━━━━━━━━{

Name: Anonymous 2011-10-18 14:55

>>50
I hate you.
Please die.

Name: Anonymous 2011-10-18 15:27

`>discussing bracing styles
`>citing the Java conventions
Just take your little "hello, world!" programs back to /g/, please !

Name: Anonymous 2011-10-18 15:34

>>52
And you take you're greentext back to the imageboards, ,,please''.

Name: Anonymous 2011-10-18 20:29

>>53
fuck you fagstorm

Name: Anonymous 2011-10-18 21:08

if (x) {
    y;
} else {
    z;
}


is the only correct style. Anything else is faggotry.

Name: Anonymous 2011-10-18 21:27

>>55
+1

Name: Anonymous 2011-10-18 21:48

I think you'll find this is the optimal curly-brace placement:


class Anus(Orifice):
    def __init__(self):
        self.occupant = None
   
    def insert(self, implement):
        assert self.occupant is None
        self.occupant = implement

>>> myAnus = Anus()
>>> myAnus.insert('}')
>>> myAnus.insert('{')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 6, in insert
ASSertionError

Name: Anonymous 2011-10-19 10:40

if x
    y
else
    z
end

The only way.

Name: Anonymous 2011-10-19 11:02

(if x
    y
    z)

Name: Anonymous 2011-10-19 12:04

>>55
Ucking Bufugly
Kid, you gots no steeze.

Name: Anonymous 2011-10-19 12:52

>>59

(if x y . z)

is superior. then you can nest them without more parentheses:


(if a
    b
 if c
    d
 .  e)


yfw everything in lisp could be this clean but lisp must insist that EVERY FORM EVER be potentially variatic.

Name: Anonymous 2011-10-19 13:08

>>61
(cond
    (a b)
    (c d)
    (else e))

Name: Anonymous 2011-10-19 13:11


A |> B :: C



cnd (A -> B
    ;y -> C)

Name: Anonymous 2011-10-19 13:13

>>61
yfw everything in lisp could be this clean but lisp must insist that EVERY FORM EVER be potentially variatic.
McCarthy designed Lisp as a backend for his Algol compiler. It was never intended to be used directly. So didnt cared about the amount of verbosity.

Name: Anonymous 2011-10-19 13:15

>>62
why not (cond a b c d e)?

Name: Anonymous 2011-10-19 14:12

>>61
Whom are you quoting?

>>65
b, d and e have implicit begins.
In Scheme (but it's of course possible in CL too), (cond (e => f) ...) means (let ((x e)) (if x (f x) ...), cond's syntax permits extensions such as (cond (e => guard f) ...) -> (let ((x e)) (if (g x) (f x) ...).
(cond a b c d e) can't be extended as easily as (cond (a b) (c d) (else e)) in a backwards compatible way.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List