• 0 Posts
  • 58 Comments
Joined 2 years ago
cake
Cake day: January 4th, 2024

help-circle



  • It sounds like the main point of confusion for you with semicolons, especially in bash and its if/then statements, isn’t about their general readability but more about their role in defining what counts as a complete statement or command, and when they are required versus optional.

    You’re right that bash requires a semicolon (or a newline) after the if condition before the then keyword if they are on the same line. This is because then is considered a separate ‘command’ or keyword that follows the if condition and its associated [ ] or (( )) test.

    A newline serves the same purpose as a semicolon.

    In contrast, languages like Lua, Python, or PowerShell often have syntax where then (or its equivalent) is intrinsically linked to the if and doesn’t require a separator between the condition and the block opening keyword, even on the same line. They typically use newlines or specific block delimiters (like end in Lua, indentation in Python, or curly braces {} in PowerShell) to define the scope of the if statement.

    While the semicolon’s general use is to put multiple commands on one line, its mandatory placement after the if condition before then in bash when on the same line is a specific syntactic requirement of bash to separate those two distinct logical parts of the if construct. Many other languages simply define if condition then block as a single syntactic unit, hence no semicolon is needed there.















  • It’s a good option to have, imo. People will try to commit suicide, even without this.

    They’ll fail and become a larger burden to society in a lot of cases. Or run up medical bills and exist miserably.

    With this method, folks who are interested have to clear a hurdle beyond their own emotions and survival instincts.

    If they’re committed to the act, this ensures a dignified end vs many terminal conditions.

    Suffering near end of life can be horribly tortuous. The ability to end the suffering on your terms with dignity is a benefit to society and those suffering.

    Do you feel hospice care is a bad thing? It’s one step removed from assisted suicide in many ways.

    In hospice care they often give you enough drugs to end it quickly, and instruct the caregivers to NOT call emergency services.

    We’re all going to die, at least we can make it somewhat civil.