Why Do We Use Whitespace To Separate Identifiers in Programming Languages?
Posted by breck@reddit | programming | View on Reddit | 9 comments
Posted by breck@reddit | programming | View on Reddit | 9 comments
remy_porter@reddit
I’d be curious to know which natural languages don’t use whitespace to denote breaks in symbol groups. I guess pictographic languages fall into that category. But alphabetic languages- I’d be curious if there are any that aren’t using some sort of whitespace.
glaba3141@reddit
Korean often omits whitespace when writing casually like on social media
Chris_Codes@reddit
Why is the hot water knob on the left and cold on the right? I’m hoping OP can tackle that one next.
divad1196@reddit
I never get why people make this kind of article. Latin languages like english use spaces to separate words and english is the most popular language.
If japanese was the most popular, programming languages might be written in it and we wouldn't have spaces (probably).
cnoor0171@reddit
I feel like I just read someone's first draft of a homework essay. Just a couple of vaguely related facts, no direct link between premise and conclusion and pretty much no substance.
jhartikainen@reddit
I'm not quite sure what the author's conclusion is in terms of what we should be using instead of whitespace, it sounds like they're proposing we should be using something else.
One thing that I've considered is could programming languages instead be written via an AST-aware editor. This would allow the program to be displayed in virtually any formatting the user wants to. Whether there is any benefit from this, I have no idea.
T-N-Me@reddit
You offer some background information and a strongly-worded conclusion. What I can't seem to find is a reason to accept your conclusion.
Could you provide an example of what you think better code would look like and explain why it's better?
breck@reddit (OP)
I am not the author. I just thought it was an interesting perspective (one that I don't agree with, but decently articulated nonetheless). Maybe someone could ping him?
khedoros@reddit
Off by 1. Tab is 9. LF is 0xa.