Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Have fun changing that code, adding more ifs etc. . And keeping the right alignment. You'll hate yourself more than the braces.
-
Could also encapsulate into single line and use the no bracket "feature" of single line statements haha.
-
Grumpy28828yGreat Scott, that's awful! It's great to be in a brace-less language (Haskell, F# etc), but when you're not you gotta deal with it and follow the conventions.
That code is an uneditable mess. -
Eldius6818y@marcantvez I knew a lot of former Java (or .NET) developer who started develop in Python/Ruby/NodeJs and started "ranting" about Java (or .NET)...
-
alkuzad14728yAfter that post I will be advocate for +18 tag for devrant. Children should not see this kind of content, it's too scary
-
Eldius6818yWhy people are so scared with semicolon and braces... I like braces to show where any block start and end........ Oh, and I don't care about semicolons...
-
Grumpy28828y@Eldius I used C back in the 80's and later C++, Java, C# etc, so I'm definitely not afraid of brackets or semicolons. Newer languages just have less ceremonial elements, that's it.
So did C when it was the new, hot kid on the block. Compare C's "}" to Ada's "end if;", "end case;" etc.
I quite like the concise, low redundancy style of newer languages, like F#.
It's "not being afraid of", it's just a matter of preference. Some prefer C++'s "counter++;", others like COBOL's "add 1 to counter giving counter". -
Eldius6818y@Grumpy finally I have a good answer...
I always listened to devs complaining about that but without an argument... -
Grumpy28828y@Eldius I should add that it was easier to define and implement a syntax requiring semicolons back in the day, when you had Lex and YACC and nothing else. The same was true for braces, because nobody had yet thought about offside rules (indents), so there was no support for it in YACC and Lex.
Also, compiler tools of yesteryear might explain why you couldn't have a variable with the same name as a user defined type. Not 100% sure about this though, but I think this was because context sensitive grammars were hard or impossible to implement. -
Grumpy28828y@khan I think the coder in question was pretty stoned already when he wrote that code.
-
Shago3028yThis is so evil. I like it.
For extra evilness you should totally indent'em out of screen. Bwahaha!! -
johnDoe32138y@Raamakrishnan Visual basic uses basically the same amount of braces as Java does though...
-
xnor15268y@nicnaknic braces are used in VB for to declare an array and for everything else, a "end something" statement is used
-
Shago3028y@Raamakrishnan also for object initialization with the With clause, and string formatting and interpolation.
I prefer those End Something, although more verbose, are simplier to understand when there are many together, not that it matters when the code is well written, but well... that's not always the case. -
johnDoe32138yAhhh I see. I was thinking of Visual Basic 2015. that version uses braces for opening and closing statements @Raamakrishnan
-
xnor15268y@nicnaknic this has been the same way from the days of VB6 till now (VB.Net). Not sure what you mean by VB 2015...
-
johnDoe32138ymy bad, seems it was released 2002. I'm not hugely familiar with VB other than VB.net the version released 2015. Did some looking and I'm more confused. Seems some version of VB uses braces apposed to "end sub" (or what not), while others do not.
The version of VB I know uses braces apposed to words to end statements. -
johnDoe32138y@Shago possibly. How ever the project files were marked as .vb not .cs
I don't even know, I'll have to check through some of my old VS projects to see what the hell was really going on cause now I'm all confused. Haven't touched VB in over a year so I need to look into this more
Hate braces?
undefined