kip: A programming language based on grammatical cases of Turkish

32 points by Sietsebb


spookylukey

I learnt Turkish and always loved how logical it is, I never thought of using it for programming.

There are lots of very cool features here. The Fibonacci code use bu, şu and o as the variable names, which are the three Turkish words for "this" / "that", which is nice as it gives you 3 variable names. The Fibonacci code is pretty readable for any Turkish reader, with just a few programming artefacts visible (brackets and indentation).

To translate this bit:

(bu tam-sayıyı) (şu tam-sayıyı) (o tam-sayıyı) işlemek,
  (onla 0'ın eşitliği) doğruysa,
    durmaktır,
  yanlışsa,
    bunu yazıp,
    şunu (bunla şunun toplamını) (onla 1'in farkını) işlemektir.

In English, a very direct translation (which sounds a bit more wooden than the original Turkish does):

  To process (this integer) (that integer) (the-other integer),
      if equality of the-other with 0 is true,
         stop
      if false,
         write this, and
         process that (the sum of this with that) (the difference of the-other with 1)

The use of grammatical case to determine subjects and give flexibility with ordering is also very neat.