Skip to content

Comment on Which programming languages are most token-efficient?parent

Comments

If you look at the list, you'll see that you're incorrect, as C and JavaScript are not at the top.

Seeing all the C languages and JavaScript at the bottom like this makes me wonder if it's not just that Curly brackets take a lot of tokens.

I imagine that having to write

  for (int index = 0; index < size; ++index)
instead of
  for index in 0...size
eats up a lot of tokens, especially in C where you also need this construct for iterating over arrays.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.