←back to thread

283 points IdealeZahlen | 1 comments | | HN request time: 0s | source
Show context
cubefox ◴[] No.42141573[source]
One thing I like about programming languages is that they usually constrain themselves to strings of ASCII characters, instead of using lots of more or less inscrutable symbols like mathematics does. For example, where a mathematician writes "Σ", a programmer simply writes "sum".
replies(1): >>42141869 #
mmooss ◴[] No.42141869[source]
You are holding up code as an example of clarity and scrutability, and because it is mostly restricted to ASCII? Hex code is even simpler - only 16 characters.

> where a mathematician writes "Σ", a programmer simply writes "sum".

Communities develop shorthand and terms of art for things they write a lot. Mathematicians need to write lots of sums; programmers have their own shorthand and terminology.

replies(1): >>42143023 #
cubefox ◴[] No.42143023[source]
Hex code doesn't allow you to write words. And "sum" is simply better than "Σ". There is no way to know in advance what the latter means, while for the former understanding of verbal English is enough. Mathematicians basically use an iconographic writing system like Chinese.
replies(3): >>42143413 #>>42144109 #>>42150400 #
int_19h ◴[] No.42150400[source]
Programmers also write something like *[3]int instead of "pointer to array of 3 integers" in most PLs.

(Modula-2 tried the latter, but it didn't stick.)

replies(1): >>42152376 #
1. cubefox ◴[] No.42152376[source]
Yeah, though such special symbols are less common. I think they are still too common though. E.g. using the unnecessarily obscure "if (A) B" instead of "if A then B".