Surprised nobody talks about the kdb codding style: https://github.com/KxSystems/kdb/blob/master/c/c/k.h
Alternative code styles
11–20 of 107 posts
Re: Alternative code styles
#12The best coding styles are the ones that allow to be translated back and forth to another style. It doesn't matter which style you prefer. As long as a computer can pick it up and translate it into the project standard style and back to yours again. You can simply setup git filters and live in you own style world.
Re: Alternative code styles
#13That Fibonacci based indentation might not be a bad idea after all. Especially when doing callback-style javascript.
Re: Alternative code styles
#14Surprised nobody talks about the kdb codding style: https://github.com/KxSystems/kdb/blob/master/c/c/k.h
:O that is ... interesting. Sure that's not an entry for the ioccc? ;)
I've been told that the guy who wrote this believe that the brain only has a limited buffer to compute source code. So he is trying to use the shortest code possible everywhere.
Re: Alternative code styles
#15That Fibonacci based indentation might not be a bad idea after all. Especially when doing callback-style javascript.
it feels like when your handwriting becomes more compressed as you are about to reach the right end of the paper
Re: Alternative code styles
#16Earlier quoted context omitted.
:O that is ... interesting. Sure that's not an entry for the ioccc? ;)
Nope :) This is being used everyday in production by most financial institutions. https://code.kx.com/wiki/Cookbook/InterfacingWithC I've been told that the guy who wrote this believe that the brain only has a limited buffer to compute source code. So he is trying to use the shortest code possible everywhere.
Re: Alternative code styles
#17 (.) :: a -> (a -> b) -> b
x.f = f x
And then the author can write e.g. x.length
Instead of length x
I think this is really quite a natural operator (and other languages support it, eg in F# it is pronounced |> and closure has something like it with ->)Re: Alternative code styles
#18That Fibonacci based indentation might not be a bad idea after all. Especially when doing callback-style javascript.
We still get a curving indentation, and we are still warned against nesting, but the indentation doesn't explode exponentially.
Re: Alternative code styles
#19> Poetry... quite eye-pleasing I disagree with this comment. That style makes the code extremely hard to follow, as there's no proper indention to identify scope.
Most of these examples are meant to be a joke, I’d assume.