Skip to content

Comment on Underscores are stupid? Get a Japanese keyboard

Comments

If youre going to use a Japanese keyboard, why not go all the way and use Kanji in your code also? Instead of (courtesy of Wikipedia)...

  def create_set_and_get(initial_value=0) # Note the default value of 0
    closure_value = initial_value
    return Proc.new {|x| closure_value = x}, Proc.new { closure_value }
  end
...we could write (excuse my Chinese)...
  做 创_去_和_来(先_值=0)
    闭_值 = 先_值
    回 程.新 {|x| 闭_值 = x}, 程.新 { 闭_值 }
  终
Oh look: all the "words" are a single character each! Why not get rid of all those silly grammar symbols in between them (just like in Chinese and Japanese writing)...
  做创去和来(先值=0)
    闭值=先值
    回程新{|x|闭值=x},程新{闭值}
  终
Now there's tons of whitespace on the righthand side, so why not make it all a single line, with spaces instead of newlines...
  做创去和来(先值=0)  闭值=先值  回程新{|x|闭值=x},程新{闭值}  终
A lot terser! Makes all the talk about semicolons and underscores sound a little silly to some people, doesn't it?

Already exists: http://www.chinesepython.org/. (Scroll down for a short translated code snippet.)

English info: http://www.chinesepython.org/english/english.html.

Chinese Python is a Chinese version of Python, but doesnt utilize the inherent tersity of CJK characters. For example it translates "import sys" as "載入 系統". The example I gave would eliminate spaces, semicolons, underscores between words by using one and only one CJK character per English word, so in the example "import sys" would become, say, "入統".

Alternatively, seeing as we are playing around with symbols...

سجل للذهاب والمجيء (القيمة الأولى = 0) = 1 قيمة مغلقة قيمة جديدة مقابل {| X | قيمة وثيقة = س}، {تشنغ عتبة نهاية}

A bit longer than the example using CJK characters, though.

AboutSource Built by g1lg1l

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