The formatting or appearance of code determines how quickly and easily the reader can understand what it does. A compiler will see no difference between this...
// Example 1: unformatted code. public class Functions { public static int fibonacci(int n) { if (n < 2) { return 1; } return fibonacci(n-2) + fibonacci(n-1); }
public class Functions { public static int fibonacci(int n) { if (n < 2) { return 1; } return fibonacci(n-2) + fibonacci(n-1); }
public static void main(String[] arguments) { for (int i = 0; i < 10; i++) { print(“Input value:” + i + ” Output value:” + power(fibonacci(i), 2) + 1); } } }
...but the second example will be more easily understood by the reader.
Name:
Anonymous2015-02-08 0:00
shit i dunno what happened
The formatting or appearance of code determines how quickly and easily the reader can understand what it does. A compiler will see no difference between this...
// Example 1: unformatted code. public class Functions { public static int fibonacci(int n) { if (n < 2) { return 1; } return fibonacci(n-2) + fibonacci(n-1); }
Any programmer, even a new programmer, can format their code without being forced to. It's also amusing how you forgot to use [code] tags and ended up with unformatted code anyways
>>11 No motherfucker, why would I call a fibs function with a number? Don't be a stupid. Plus can you get that on more than one line so it doesn't fall off my screen? No fucko, I didn't think so! ``One-line lambda'' is more of a limitation than a feature!
Name:
Anonymous2015-02-08 12:27
Any programmer, even a new programmer, can format his code without being forced to. It's also amusing how you forgot to use [code] tags and ended up with unformatted code anyways
Name:
Anonymous2015-02-08 12:35
>>11 What kind of shitty programming language would use a 6-letter reserved word for a lambda? It's not even meaningful, the word "lambda" is just the name of a Greek letter and has no connections to the concept of an anonymous function. So what's the point of writing it out every fucking time? Why not just use "lam" or ".\" or "fn" like the sane people who created ML did? Nooo, I want to write out 6 meaningless letters every time I want to define an anonymous function! Numbskulls.
Well, in some logarithms , an interface is going to be internal to the system, but an abstract class has terminators that make it external
Name:
Anonymous2015-02-08 16:38
>>14 Lambda is my favorite Greek letter to write. Everyday, I write the Greek alphabet five times when I wake up, and doing the final curve strokes on λ (the unicode doens't do it justice) just makes me feel so satisfied.
And since I know somebody is bound to ask, my least favorite Greek letter would probably be either xi or zeta.
Name:
Anonymous2015-02-08 18:01
>>17 But it has nothing to do with anonymous functions.