1662
submitted 1 year ago by 5SpeedDeasil@lemmy.world to c/memes@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] GTG3000@programming.dev 2 points 1 year ago

Math notation is just terrible in general because a lot of it is shorthand made up by someone who likes single-letter variables. A symbol you can't type, something above, something below.

A for loop is clear and descriptive.
Or if you're feeling fancy, you could go functional with reduce(add, range(0, 5), 0).

[-] Inky@lemmy.ca 1 points 1 year ago

Mathematical notation was designed to be written by hand. It is at least as clear and descriptive as any syntax from a programming language. You're pretending that the abstraction behind a for loop is somehow less than that behind a sum or product notation.

this post was submitted on 16 Jul 2023
1662 points (96.5% liked)

Memes

45657 readers
678 users here now

Rules:

  1. Be civil and nice.
  2. Try not to excessively repost, as a rule of thumb, wait at least 2 months to do it if you have to.

founded 5 years ago
MODERATORS