Login Register






FizzBuzz in 10 programming languages filter_list
Author
Message
RE: FizzBuzz in 10 programming languages #8
(07-07-2013, 09:38 PM)Deque Wrote: Use Haskell. Or Prolog. Wink

The Java code doesn't adhere the coding conventions. Class names are uppercase. Java also has the ++ operator, btw.

The main function of the C code needs a return statement. Making i a global variable is not necessary. Stay as local as possible.

Starting loops at 1 is odd.

For loops in python should always use xrange instead of range.

How come I didn't think of Haskell instead of going for Java, which, as it appears, I don't know at all. I don't really know Prolog.

I'll change the class names (only one llitter's got to be uppercase, right?), though, it works this way too, is there any actual difference or is it just convention?

The main function in C does *not* need a return statement: it's a void function. For the variable, yes, you're right.

Why is it odd to start a loop at 1? :huh:

I'm not good with Python, you know, may I get a brief reason for what you're argueing?

Going to make some edits.

Edit: you know Prolog too?

Edit: I knew Java had the ++ operator, I thought I had used it.
My Bitcoin address: 1AtxVsSSG2Z8JfjNy9KNFDUN6haeKr7LiP
Give me money by visiting www.google.com here: http://coin-ads.com/6Ol83U

If you want a Bitcoin URL shortener/advertiser, please, use this referral: http://coin-ads.com/register.php?refid=noize

Reply





Messages In This Thread
FizzBuzz in 10 programming languages - by noize - 07-07-2013, 09:04 PM
FizzBuzz in 10 programming languages - by noize - 07-07-2013, 09:04 PM
FizzBuzz in 10 programming languages - by noize - 07-07-2013, 09:04 PM