Just remember, love is life and hate is living death...

The Community

*
Treat your life for what it's worth, and live for every breath.
Welcome, Guest. Please login or register.

Login with username, password and session length

News:

2026-02-11 Eight years and still going strong!
2025-01-02 Happy New Year! This little experiment of ours has been rolling for almost 7 years now!
2024-02-11 Six years!
2023-02-11 The Five Year Plan continues!
2022-02-11 Four years, Happy Birthday to the Community!
2021-02-11 Three years, how the time flies!
2020-02-11 Two years and counting!
2019-02-11 Happy 1st Anniversary to the Community!
2018-11-10 RIP our brother, founding member, mr. Billy Underdog :-(
2018-06-22 Discman says, "Reminds me of the good ol days. LOL"
2018-02-11 The Community arises from the Internet!


  • Home
  • Help
  • Search
  • Posts
  • Login
  • Register

  • The Community >>
  • General Category >>
  • Matters of Life and The Universe >>
  • Programming!
« previous next »
  • Print
Pages: [1]

Author Topic: Programming!  (Read 4742 times)

Vyn

  • Special Sauce
  • Global Moderator
  • Top Critic
  • *****
  • Posts: 3797
  • Awesomeness: 37
    • View Profile
Programming!
« on: December 15, 2023, 04:15:41 PM »
Some of the developers at work today were discussing some of the finer points of using C++, and the topic when I walked up was brace initialization vs. traditional assignation. So, int a{0}; versus int a = 0;. The consensus was that brace initialization should only be used when the possibility of conversion narrowing was present, otherwise the braces make it harder to understand.

I just wandered off, but I got to thinking: its just a symbol. A person has to learn what the symbol means, and then there is no problem. I mean, people have to learn that "=" is an assignment operator, not an equivalency indicator (like a == a), and if they can wrap their noggin around that, what makes {} such a burden that it's better to put forth the extra effort to prognosticate about how one's variable might get stuffed with something bigger than it can hold and then apply braces, rather than just go with the braces across the board.

Spend enough time at it, and a person can easily understand cuneiform. So, why the concern about someone's source code suddenly becoming "hard to understand" if they use those braces?

Fucking programmers.
Logged
Are your humours balanced?

Zzzptm

  • Wild card! Yeehaw!
  • BeNice
  • Producer/Engineer
  • *
  • Posts: 15397
  • Awesomeness: 31
  • The Dude abides.
    • View Profile
Re: Programming!
« Reply #1 on: December 17, 2023, 09:18:02 AM »
There's more whitespace around a = 0, so from a readability standpoint, that's easier to read. Otherwise, yes, symbols are symbols, no one more difficult than the other, once you've experienced it. After a few days in China, I was reading common Mandarin characters and translating them directly into English, so I knew "exit" from "street", "bathroom", and the directional characters (NSEW and central).

When's the last time we used a 3.5" floppy, yet what is the symbol for "save"? It's the floppy disk in common use at the time the first iconizations of tasks were introduced in programming interfaces. Now, people who have no clue what a floppy is just know "the symbol for save". Other examples come to mind from the world of VCRs...
Logged
"Yeah, well... you know... that's just, like, uh... your opinion, man." - The Dude

"Think! It ain't illegal yet!" - George Clinton

Vyn

  • Special Sauce
  • Global Moderator
  • Top Critic
  • *****
  • Posts: 3797
  • Awesomeness: 37
    • View Profile
Re: Programming!
« Reply #2 on: December 17, 2023, 02:47:25 PM »
Whitespace, readability...yeah, ok. Did a little digging around, and ran across the joke language called brainfuck.

Talk about readability!

https://en.wikipedia.org/wiki/Brainfuck

Logged
Are your humours balanced?

Zzzptm

  • Wild card! Yeehaw!
  • BeNice
  • Producer/Engineer
  • *
  • Posts: 15397
  • Awesomeness: 31
  • The Dude abides.
    • View Profile
Re: Programming!
« Reply #3 on: December 18, 2023, 08:37:08 AM »
Yeah, we're gonna need some comments on that code... :lol:
Logged
"Yeah, well... you know... that's just, like, uh... your opinion, man." - The Dude

"Think! It ain't illegal yet!" - George Clinton

  • Print
Pages: [1]
« previous next »
  • The Community >>
  • General Category >>
  • Matters of Life and The Universe >>
  • Programming!
 

CREDITS


  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • XHTML
  • RSS
  • WAP2


Copyright 2011-2018. All Rights Reserved.

Designed by Zzzptm.