idk-lang 1

Preface

A lot of programmers at some point end up wanting to write their own language. As unlikely as it may be, they think that they have better ideas than anyone else has ever had. Now, it's my turn.

I have had a single project like this one before. I called it myth and it was really nothing more than a incomplete toy language. I quickly learned that the best way to develop a language would be: come up with a satisfactory language specification, freeze it, then implement it. Upon successful implementation, one can revise the language spec. The main point here is, implementation and changing the language spec should never be happening simultaneously.

Before really getting into this, I also tried to think about why a language like this doesn't exist yet. Maybe there's something I'm missing (likely) or maybe there's something everyone else is missing (unlikely). For example, Golang was co-developed by Ken Thompson, who designed and implemented the original Unix operating system. This guy has seen it all, and he was there since the beginning. He was given a chance to really change how things were done, what kind of bugs people would encounter, and yet, Golang still has pointers... My language won't have pointers, or any notion of memory management. So, either I am missing something huge (likely) or Ken has gone completely insane (unlikely).

Enter idk-lang

Currently, I have no idea what to call this language, so I've temporarily named it idk-lang. Some key features would be, syntax as readable and as writable as Python's, static typing, high support for functional programming features, something as close to duck typing as possible in a strict statically typed language. Another key aspect of the language would be that the few rules that govern it are strict and highly orthogonal.

Read on to see some code samples. The next section is on literals and operators.