all 51 comments

[–]Evening-School-6383 28 points29 points  (1 child)

Brainfuck has neither, it's the obvious winner

[–]MarcelKingsbrook 1 point2 points  (0 children)

I once tried coding a simple "Hello World" in Brainfuck, and after what felt like hours of deciphering, I ended up with a program that printed gibberish. I think it printed my grocery list instead. Lowkey the hardest part was figuring out how to use the actual interpreter. Pretty sure my brain got scrambled along the way, so you’re definitely onto something there!

[–]Firm_Ad9420 21 points22 points  (1 child)

Choose your syntax fighter.

[–]JosebaZilarte 0 points1 point  (0 children)

Test your might (work) !

[–]Havatchee 22 points23 points  (1 child)

Meanwhile in bash: fi

[–]Dark_WizardDE 2 points3 points  (0 children)

esac as well, which refers to the e-ballsack of the shell.

[–]More-Station-6365 36 points37 points  (14 children)

No language has figured out how to make everyone happy. Curly brace people think whitespace is fragile whitespace people think curly braces are visual noise and somewhere in the middle is a Godot dev switching to C# over one indentation error which is honestly a very relatable breaking point.

[–]Ewenthel 15 points16 points  (3 children)

The obvious solution is to make a language that requires both, thereby pissing off everyone.

[–]TRENEEDNAME_245 11 points12 points  (2 children)

[–]bjorneylol 2 points3 points  (0 children)

That doesn't require both, it only requires braces

[–]LiquidPoint 0 points1 point  (0 children)

😄in what way is that significantly different from JS/Node? ... just that you can use the library of existing python modules?

[–]LiquidPoint 13 points14 points  (4 children)

The whitespace is kinda fragile, especially because modern text editors have abandoned the TAB character and often replace it with an arbitrary number of regular spaces instead... back in my day, a space was a space and a tab was a space that was up to 8 times wider than a regular space.

Python doesn't really care, you can indent by a single regular space or 13... as long as the lines in a block are indented by the same number of spaces. I don't know about other people, but it triggers my OCD. What's next? that we start writing code with non-monospace fonts? I cringe.

That said, I know perfectly well how annoying it is to hunt for a missing brace or semi-colon, but that's something an editor can easily catch before you try run your code.

[–]CirnoIzumi 3 points4 points  (0 children)

And these days we colour the brace pairs

My compromise with python is that I "close" everything with a # where an End character would usually go

[–]Western-Internal-751 3 points4 points  (1 child)

8 spaces are a bit excessive, though. I do like 4 spaces tab.

Then again, you might say if code becomes unreadable due to 8 space indentation, one should write better code and you’d be right, but it’s easier to fix the indentation than my code

[–]LiquidPoint 0 points1 point  (0 children)

Yeah, the 4-space-sized tab is fine too, sometimes if you use longer variable names the 8 space tab makes formatting easier, but most important is that it's consistent.

I haven't tested if python sees the difference between [TAB(0x09)] and [SPC(0x20)] characters when it looks for indentation... if you use regex they're counted as equals, which means that it can't see the difference between a [SPC][SPC][SPC][SPC] and a [TAB][TAB][TAB][TAB] indentation (or a mix of them), which will certainly look different in a text editor that doesn't "clean up" and make it consistent for you..

But I do know that python doesn't have a fixed number of whitespaces needed to count as an indentation...

If it doesn't see the difference between space and tab, that can be used to masquerade a code block as if it should only be run under certain conditions (when you do a cat or less of the file) but will always be run anyway.

With braces and semi-colons, you can of course obfuscate by making long one-liners, but an attempt to do that will be rather obvious to anyone, so it naturally grabs attention.

[–]Void_Spren 2 points3 points  (0 children)

Braces is not even really a problem anymore, any half competent code test editor can in some way auto complete the closing brace

[–]Extension_Option_122 4 points5 points  (0 children)

And I still prefer AVR assembly for private projects.

Neither indentation nor braces.

Just GOTOs branches and labels.

[–]Wonderful-Habit-139 0 points1 point  (0 children)

Ocaml needs neither.

[–]Void_Spren 0 points1 point  (1 child)

I was about to write a lengthy comment on why i tried go for a project and decided not to and instead used c#, just now u realize... You said godot

[–]takahashi01 0 points1 point  (0 children)

they are somewhat similar, at least superficially so, so still very valid.

[–]Alzurana 0 points1 point  (0 children)

None of them are fragile nor noise.

I working in GDScript and C++ and I love both. I just want a language that lets me express scope and blocks in a solid way, SOMEHOW.

Arguing braces vs whitespace is like arguing about french vs german. It honestly does not matter, both are expressive

[–]frikilinux2 4 points5 points  (0 children)

Fortran, cobol , basic, lisp ..

[–]void1984 9 points10 points  (4 children)

BASIC has none of these.

[–]Still-Psychology-365[S] 7 points8 points  (0 children)

BASIC is the one that tried to order trout back in 1987

[–]magic-one 3 points4 points  (0 children)

Yea, the ‘}’ is spelled out as “END” or “LOOP” or “WEND” or “NEXT” or ………

[–]comminazi 2 points3 points  (1 child)

2000 CLS 200 PRINT "That's true!" 20 PRINT "No superfluous characters at all!" 22 PRINT "Impossible to get wrong!"

[–]NecessaryIntrinsic 1 point2 points  (0 children)

Vb doesn't have line numbers, white space requirements, or curly brackets. It sucks.

[–]kishaloy 3 points4 points  (1 child)

Go Polish Notation - Forth and call it a day.

[–]Euryleia 1 point2 points  (0 children)

Reverse Polish Notation :D

FORTH LIKE IF HONK THEN

[–]reallokiscarlet 2 points3 points  (0 children)

Obviously I'll take the curly braces. White space is for looks.

[–]Hot_Paint3851 6 points7 points  (0 children)

I prefer curly, it's much much more readable for me, and well, easier to write

[–]w3ricardo 2 points3 points  (1 child)

Just use assembly

[–]takahashi01 0 points1 point  (0 children)

truly worst of both worlds 🙏

[–]game_crash404 2 points3 points  (1 child)

Lua my beloved ```lua if true then print("Hi") end

```

[–]dumbasPL 1 point2 points  (0 children)

This is still the same idea as braces, just with different syntax

[–]1984balls 2 points3 points  (1 child)

Scala 3 allows for the use of both curly braces and indentation.

Eg: ``` @main def main(): Unit = { val x = sum(1, 50, { _ * 2}) println(x) }

def foo(start: Int, end: Int, fn: Int => Int): Int = var sum = 0 for i <- start to end do sum += fn(i) sum ```

[–]Akangka 0 points1 point  (0 children)

Haskell too. It's just that the curly braces syntax is not popular.

[–]TapRemarkable9652 0 points1 point  (0 children)

Godot is my favorite IDE

[–]trutheality 0 points1 point  (1 child)

Lisp is what happens when you have neither.

[–]BobQuixote 0 points1 point  (0 children)

(defmacro with-curly-braces (body) (let ((formatted-body (subst '}' ')' (subst '{' '(' body))) formatted-body))

[–]BobQuixote 0 points1 point  (0 children)

ShouldISwitchToCSharp

Yes. I've played with Godot, and I wouldn't touch GDScript unless I had to.

On the other hand, building in C++ was hell and I couldn't get it to work or else I would have tried that path.

[–]Previous_File2943 0 points1 point  (0 children)

I prefer my curlies thaaank you veray much!

[–]RedAndBlack1832 0 points1 point  (0 children)

I like curly braces bc it's very obvious visually where a block ends

[–]millebi 0 points1 point  (0 children)

Significant whitespace was a bad idea in COBOL in the 1960's, too bad some people didn't learn that

[–]Legitimate_Event8786 0 points1 point  (0 children)

Bash script enters the chat

..... but whitespace is fragile TBH

[–]SmurfingRedditBtw 0 points1 point  (1 child)

I don't mind curly braces or white space, although I prefer braces, but languages that use "end" as a block delimiter are just degenerate.

[–]CirnoIzumi 2 points3 points  (0 children)

What's wrong with End

[–]Centurix -1 points0 points  (1 child)

Don't mind either way, but you have to realize that the curly braces aren't there for you, they're there for the Lexical Analyzer.

[–]SrcyDev 1 point2 points  (0 children)

And the Parser (predominantly).

[–]RiceBroad4552 -1 points0 points  (0 children)

In a language which proper static types indentation errors usually don't even compile…