Click here to Skip to main content
15,890,741 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: When did syntax become so fussy? PinPopular
Mircea Neacsu9-Jun-21 10:48
Mircea Neacsu9-Jun-21 10:48 
GeneralRe: When did syntax become so fussy? Pin
jathalls11-Jun-21 2:01
jathalls11-Jun-21 2:01 
GeneralRe: When did syntax become so fussy? Pin
raddevus11-Jun-21 9:53
mvaraddevus11-Jun-21 9:53 
GeneralRe: When did syntax become so fussy? Pin
James Lonero12-Jun-21 17:44
James Lonero12-Jun-21 17:44 
GeneralRe: When did syntax become so fussy? Pin
jathalls12-Jun-21 22:28
jathalls12-Jun-21 22:28 
GeneralRe: When did syntax become so fussy? Pin
Jon McKee9-Jun-21 11:06
professionalJon McKee9-Jun-21 11:06 
GeneralRe: When did syntax become so fussy? Pin
Wizard of Sleeves10-Jun-21 20:29
Wizard of Sleeves10-Jun-21 20:29 
GeneralRe: When did syntax become so fussy? Pin
Jon McKee10-Jun-21 23:33
professionalJon McKee10-Jun-21 23:33 
Readable line counts are what matters. Most software, including the Windows 10 source, could technically be represented on a single line (get wrecked Python nerds Cool | :cool: ).

Also, and I might be a pedant, but I'd say this
TypeScript
int y = x switch { "test" => 0, "test1" => 1, "test2" => 2, _ => 3 };
is way more readable than this
TypeScript
int z = -1; switch (x) { case "test": z = 0; break; case "test1": z = 1; break; case "test2": z = 2; break; default: z = 3; break; };
since it has fewer columns, reads much like an array initializer syntax which is common in modern languages, and due to the restrictions on the expression syntax the case body is a relatively constant size (a compound scope isn't allowed like with the statement syntax).

modified 11-Jun-21 6:04am.

GeneralRe: When did syntax become so fussy? Pin
Wizard of Sleeves11-Jun-21 1:45
Wizard of Sleeves11-Jun-21 1:45 
GeneralRe: When did syntax become so fussy? Pin
Cp-Coder9-Jun-21 12:29
Cp-Coder9-Jun-21 12:29 
GeneralRe: When did syntax become so fussy? Pin
Nelek9-Jun-21 19:52
protectorNelek9-Jun-21 19:52 
GeneralRe: When did syntax become so fussy? Pin
Mike Hankey9-Jun-21 13:05
mveMike Hankey9-Jun-21 13:05 
GeneralRe: When did syntax become so fussy? Pin
James Lonero12-Jun-21 17:46
James Lonero12-Jun-21 17:46 
GeneralRe: When did syntax become so fussy? Pin
PIEBALDconsult9-Jun-21 14:05
mvePIEBALDconsult9-Jun-21 14:05 
JokeRe: When did syntax become so fussy? Pin
enhzflep9-Jun-21 23:47
enhzflep9-Jun-21 23:47 
GeneralRe: When did syntax become so fussy? Pin
Maximilien10-Jun-21 2:53
Maximilien10-Jun-21 2:53 
GeneralRe: When did syntax become so fussy? Pin
Marc Clifton10-Jun-21 3:47
mvaMarc Clifton10-Jun-21 3:47 
GeneralRe: When did syntax become so fussy? Pin
obermd10-Jun-21 4:53
obermd10-Jun-21 4:53 
GeneralRe: When did syntax become so fussy? Pin
Gerry Schmitz10-Jun-21 5:26
mveGerry Schmitz10-Jun-21 5:26 
GeneralRe: When did syntax become so fussy? Pin
Gary R. Wheeler10-Jun-21 9:28
Gary R. Wheeler10-Jun-21 9:28 
GeneralRe: When did syntax become so fussy? Pin
Jon McKee10-Jun-21 23:54
professionalJon McKee10-Jun-21 23:54 
GeneralRe: When did syntax become so fussy? Pin
Gary Wheeler11-Jun-21 3:55
Gary Wheeler11-Jun-21 3:55 
GeneralRe: When did syntax become so fussy? Pin
pmauriks10-Jun-21 19:56
pmauriks10-Jun-21 19:56 
GeneralRe: When did syntax become so fussy? Pin
Member 916705710-Jun-21 20:21
Member 916705710-Jun-21 20:21 
GeneralRe: When did syntax become so fussy? Pin
The Real Paps10-Jun-21 20:48
professionalThe Real Paps10-Jun-21 20:48 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.