Why you can't code in Hebrew...

time to read 3 min | 529 words

In response for my DDD in Hebrew, I was asked why it is not recommended to code in Hebrew. I decided to question my initial response, and give it a shot. I quickly gave it a try and created the following domain model. I don't expect you to be able to read it (although if you can, you'll find it hilarious).

Here is my DDD in Hebrew, the classes are Employee (right, top), Report (Left, Top), HoursReport (Middle, Bottom), WontBeHereReport (Left, Bottom) and Repository<T> (Right, Bottom):

(Image from clipboard).png

I run into a couple of issues just with designing this diagram:

  • Trying to specify a generic parameter in Hebrew cause issues because of alignments. Basically, the whole class name is presented in the wrong way (this is a common issue with mixing Hebrew & math together).
  • Intellisense is mostly useless, check out this, you may not be able to see it, but the Hebrew is half-way reversed.
    (Image from clipboard).png
  • For some reason Visual Studio is working a lot harder when I write code in Hebrew.

Let us move to more serious issues, take a look at this simple program:

(Image from clipboard).png

Main issues:

  • Hebrew is written right to left, the code here is structured left to right.
  • Hebrew doesn't have upper/lower casing, so words need to be seperated by "_".
  • I often need to switch keyboard setttings ( even something as simple as "<" has different orientetions in Hebrew and English).
  • I need to use primitives (such as DateTime) in English.
  • I need to mix English and Hebrew in the same line (see the "new" lines).
  • All control flow is in English.
  • You can't grep this source. At least not easily. Hebrew and the command line do not mix.

That is even beside the nice point of the enconding hell that you get yourself into. It is very easy to save this as ASCII (if you open it in an editor that doesn't support unicode, or simple use a tool to go over it) and lose all the hebrew characters.

Sorry Eliezer, but you will have to write Hebrew# and language pack, and write a translation layer for the framework if you really want me to use it.