Discussion
Loading...

Post

Log in
  • About
  • Code of conduct
  • Privacy
  • About Bonfire
nixCraft 🐧
nixCraft 🐧
@nixCraft@mastodon.social  ·  activity timestamp 7 months ago

which one are you? depending upon the correct choice you may be able to join my Grill / Barbecue else we can’t be friends 🤣

Six blocks of code demonstrating different indentation and brace styles for a while loop, including: K&R, Horstmann, Haskell, Allman, GNU, and Lisp.
Six blocks of code demonstrating different indentation and brace styles for a while loop, including: K&R, Horstmann, Haskell, Allman, GNU, and Lisp.
Six blocks of code demonstrating different indentation and brace styles for a while loop, including: K&R, Horstmann, Haskell, Allman, GNU, and Lisp.
  • Copy link
  • Flag this post
  • Block
trilinquenthydra
trilinquenthydra
@trilinquenthydra@mastodon.pub.solar replied  ·  activity timestamp 7 months ago

@nixCraft I've read suckless and Linux kernel coding style, both are afaik promoting Allman for several reassons but I always prefer K&R for my personal prohects, anything else I stick with the coding style of the project

  • Copy link
  • Flag this comment
  • Block
Microfractal
Microfractal
@Microfractal@mathstodon.xyz replied  ·  activity timestamp 7 months ago

@nixCraft K&R

  • Copy link
  • Flag this comment
  • Block
bhaugland
bhaugland
@bhaugland@mastodon.social replied  ·  activity timestamp 7 months ago

@nixCraft the one and true format K&R

  • Copy link
  • Flag this comment
  • Block
Bert Driehuis
Bert Driehuis
@bertdriehuis@infosec.exchange replied  ·  activity timestamp 7 months ago

@nixCraft if I get to pick the style, it's K&R for me. The saved vertical space increases the legibility of the code. I hate having to scroll to see the whole function.

  • Copy link
  • Flag this comment
  • Block
JoyOfLiving
JoyOfLiving
@JoyOfLiving@mastodon.social replied  ·  activity timestamp 7 months ago

K&$ for JavaScript. Allman for everything else.

The rest of them are for insane people.

@nixCraft

  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 7 months ago
@nixCraft GNU always
  • Copy link
  • Flag this comment
  • Block
Knightmare
Knightmare
@LanceJZ@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft //Allman
  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 7 months ago
@nixCraft K&R
  • Copy link
  • Flag this comment
  • Block
Worik
Worik
@worik@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft while x == y {
foo();
bar();
}
  • Copy link
  • Flag this comment
  • Block
Expired Token
Expired Token
@expiredtoken@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft K&R then, I did not know it was called like that!
The GNU style is... original 🙄.
  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 7 months ago

I’m firmly Allman but K&R is also acceptable. Haskell has a certain charm but only if you used macros to replace the brackets.

  • Copy link
  • Flag this comment
  • Block
Ponali
Ponali
@ponali@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft K&R, though with less spaces sometimes
  • Copy link
  • Flag this comment
  • Block
Michael Cook
Michael Cook
@foobarsoft@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft K&R4LIFE
  • Copy link
  • Flag this comment
  • Block
bimmer
bimmer
@bimmer@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft K&R 4 lyf
  • Copy link
  • Flag this comment
  • Block
Wah+
Wah+
@WahPlus@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft Allman! :D
  • Copy link
  • Flag this comment
  • Block
Christopher Isene
Christopher Isene
@cisene@mastodon.social replied  ·  activity timestamp 7 months ago

@nixCraft I do K&R and Allman, depending on language and code base

  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 7 months ago
@nixCraft
K&R, though I am experimenting with a variant that starts like K&R but ends like Lisp (except for functions though. I'm batshit but not *that* batshit)
  • Copy link
  • Flag this comment
  • Block
Marcus M. 滅拉 マルクス🐧
Marcus M. 滅拉 マルクス🐧
@mocm@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft K&R
  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 7 months ago
@nixCraft K&R. and fuck everyone else, they’re psychopaths
  • Copy link
  • Flag this comment
  • Block
James Cameroun
James Cameroun
@ratel@mastodon.social replied  ·  activity timestamp 7 months ago

@nixCraft K&R. GNU when I'm tired.

  • Copy link
  • Flag this comment
  • Block
eryk :BlobhajTransPrideHeart:
eryk :BlobhajTransPrideHeart:
@kameleonnn@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft K&R or Allman or a secret third thing (its all in one line)
  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 7 months ago
@nixCraft The Haskell one fills me with rage. 🫣
  • Copy link
  • Flag this comment
  • Block
Federation Bot
Federation Bot
@Federation_Bot replied  ·  activity timestamp 7 months ago
@nixCraft either Allman or K&R… some I wonder the sanity of the authors of the language.
  • Copy link
  • Flag this comment
  • Block
Dustin
Dustin
@digitalkrampus@mastodon.social replied  ·  activity timestamp 7 months ago
@nixCraft I'm surprised this didn't come up:

// Spacers
while(x==y){foo();bar();}

  • Copy link
  • Flag this comment
  • Block

A small Bonfire corner on the internet

This is a small personal instance of Bonfire in the Fediverse.

A small Bonfire corner on the internet: About · Code of conduct · Privacy ·
Bonfire social · 1.0.1 no JS en
Automatic federation enabled
Log in
  • Explore
  • About
  • Code of Conduct