Hacker News new | past | comments | ask | show | jobs | submit login

> Yet we don't complain about english? Why?

I'm pretty sure now that you are a native English speaker. I am not and I do complain. But if one only knows one language then I can only quote Lutwid Wittgenstein: "The limits of my language mean the limits of my world". (he refers to thoughts)

> If you can see validity in literate programming than basically my variable naming is a tiny tiny step in that direction.

No need for that, because history has shown that people like English keywords, but that's about it. Just look at SQL - many people complain about the verbose syntax, which comes from trying to make it read like English "for business people" (who don't use it anyways). Check discussion here: https://news.ycombinator.com/item?id=24730713

But SQL is not a general purpose programming language - let's look at one of these: COBOL. It is literally what you want: programs look like text, which comes from trying to make it read like English "for business people" (who don't use it anyways). And guess what? No one who actually uses it really likes the syntax.

Maybe you should start with Mathematicians and ask them to stop naming their variables "x" or "f" and use English instead of symbols. How about that? :)




>I can only quote Lutwid Wittgenstein: "The limits of my language mean the limits of my world"

Except I don't see how a quotation proves anything or how this is relevant. First off is Lutwid correct? Can you think of things outside of language? Can you think in pictures? If so than I would say he's wrong.

Second off, what does this have to do with bad naming in a programming language? Nothing.

>No need for that, because history has shown that people like English keywords, but that's about it.

I'm not arguing for english or english keywords. I'm arguing for phrasing in naming things, this is exactly what literate programming is arguing for. I may have used the word "English" because HN is an english forum but you can easily replace that with "Any relevant language"

>Check discussion here: https://news.ycombinator.com/item?id=24730713

Check out my response to it here: https://news.ycombinator.com/item?id=24733487

The article is talking about composability not readability which is a separate problem. SQL is in fact quite a readable language. Many people can read a query and instantly derive meaning. Either way I am not talking about programming language syntax. I am talking about naming within the bounds of the syntax.

>let's look at one of these: COBOL. It is literally what you want: programs look like text, which comes from trying to make it read like English "for business people" (who don't use it anyways). And guess what? No one who actually uses it really likes the syntax.

It's not about whether or not the writer likes the syntax. Clearly program writers have a bias for elegance over readability. It's about whether someone can read your program and completely understand it in one pass. Clearly COBOL was first off, not guaranteed to be readable and second off had many many other issues outside of readability. Readability was definitely not the main issue with COBOL.

>Maybe you should start with Mathematicians and ask them to stop naming their variables "x" or "f" and use English instead of symbols. How about that? :)

All mathematicians are expected to write paragraphs in "English" or some other relevant language outside of equations. Many math papers and math books have more written english than equations.

Whenever a mathematician uses the letter "x" or "f" they define the meaning with an english phrase or paragraph. This is expected for clarity in math and in english but for some odd reason not expected for programmers. The mathematician can only get away with an "x" or an "f" because he has an accompanying english explanation defining those variables right next to the equations.

Programmers are like mathematicians writing conceptual papers using only equations and math symbols without the english explanations. We have the luxury to insert some english into the naming of primitives so we should take advantage of that lest all our programs devolve into primitives with single letter names.

Sure we can comment our code. But people tend not to do that to the degree that it's done to explain things in a mathematical research paper.


> It's about whether someone can read your program and completely understand it in one pass

That's not the only thing. It's also how fast they can read/understand the program code.

> All mathematicians are expected to write paragraphs in "English" or some other relevant language outside of equations.

Sure, we do that for software also - we document things outside of the code. For example in a wiki, a README.md or sometimes even just above the code as comment/docs. But that's not what I was talking about, right?

> Whenever a mathematician uses the letter "x" or "f" they define the meaning with an english phrase or paragraph.

So you are fine if a developer does e.g. `c := (some super complex expression) // find relevant customer` and then goes on to use just `c` everywhere in their code instead of `relevantCustomerBlaBlaBla`?

Also, mathematicians don't always do that. Sometimes they just say "let x be [insert complex equation]". See for yourself in https://en.wikipedia.org/wiki/Conformal_geometry or https://en.wikipedia.org/wiki/Riemann_surface

I'm sure your will find a lot of papers, books and articles where they do this.


>That's not the only thing. It's also how fast they can read/understand the program code.

What are you doing? Speed reading? Even 2xing the reading time with verbosity is not a factor if lack of verbosity forces the reader to switch context multiple times in order to elucidate meaning.

>Sure, we do that for software also - we document things outside of the code. For example in a wiki, a README.md or sometimes even just above the code as comment/docs. But that's not what I was talking about, right?

Major difference. In math it's required. In programming it's recommended and rarely done. When it is done, it's rarely done in a form that's as complete or as detailed as math. YOu get an outline at best. Programmers are expected to read code without documentation because program writers are too lazy to write documentation.

SO what I'm saying is put your documentation into the code itself. Self documenting code with readable names as opposed to elegant.

>So you are fine if a developer does e.g. `c := (some super complex expression) // find relevant customer` and then goes on to use just `c` everywhere in their code instead of `relevantCustomerBlaBlaBla`?

relevantCustomerMetric is way better than c everywhere. Autocomplete should alleviate the pain of typing. Not every programmer arrives at the variable where it was incepted so they can't see the comment.

>Also, mathematicians don't always do that. Sometimes they just say "let x be [insert complex equation]". See for yourself in https://en.wikipedia.org/wiki/Conformal_geometry or https://en.wikipedia.org/wiki/Riemann_surface

Isn't "let x be" english? What's the purpose of those words? Clarity.


> Isn't "let x be" english

How is `let x be ???` any different from `let x = ???`


"let" is still english. "let x =" is short for "let x equal"


Exactly - so why do you treat them different? Because programmers use "=" and mathematicians write "be"?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: