Vlad Skvortsov's Blog

Tags
cyrillic ditrack gtd guitar ideas languages mac music pdf phd postscript productivity programming projects python r russian shell tex tips wadcomblog

My name is Vlad Skvortsov, I'm a software engineer: it's my job, hobby and addiction.

My primary interests include high-performance, scalable, fault-tolerant distributed systems; server-side applications; information retrieval technologies; procedural aspects of software engineering process.

I work on several private and open-source projects, hacking in Python, Haskell, Erlang, Perl and C.

Guitar, hiking, ice hockey and other hobbies help me to balance my life.

My e-mail is vss@73rus.com.

Small Ideas For A Better Programming Language (Part 1)

Jan 16 2008, 13:00 permalink

Some time ago I've started taking notes of things that I would implement in a "perfect" programming language if I was creating one. I'm starting with minor and/or vague general things which I'm pretty positive about.

No tabs

The tab character should be considered invalid in the language. From what I can observe, it rarely (if ever) adds any value but is often a subject of religious wars and (most importantly) a reason for inconsistent source indentation. I think it's time to go radical about that and eliminate the problem right from the start.

Comments

The language should allow commenting out a single line (e.g. with '#') as well as big blocks of code ('/* ... */' or '(* ... *)'). It should be possible to arbitrarily nest commented blocks.

Compilation and interpretation

The language should support both interpretation and compilation. It should be possible to compile a large program unit-by-unit (as with C). The compiler should be able to produce bytecode as well as native code.

Distribution of libraries and applications

It should be possible to distribute either open- or closed-source libraries and applications including completely standalone ones (without any need for installed libraries/interpreters/etc). The language should be distributed under BSD-like license to allow adoption by both opensource and commercial users.

Standard library

A great emphasis should be put on the comprehensive standard library. Since disk space is cheap nowadays and only required code gets compiled into a binary/bytecode there isn't a big deal in distributing a large library with the language. Python's approach seems to work pretty well: the library includes all sorts of packages (so if you say "my application requires Python 2.4" you can be sure the user won't have to go through a painful process installing the dependencies) and is growing over time as various external libraries are considered stable and useful enough for inclusion.

POSIX API should also be readily available so that it's possible to write low-level stuff as well. May be it's even worth adding something like APR into the standard library in order to abstract out system-specific things like locking, process management, etc. Again, speaking from my Python experience as an example, even though Python's standard library includes locking primitives, it is insanely difficult to make them work portably across different platforms. Why reinventing the wheel again and again if the Apache project has already solved the issue?

Integration with assembler

I mean the portable assembler — C. To ensure wide adoption and extension of the language, integration with C should be thought of right from the start. The very first version of the language distributed should come with tools and documentation on how to integrate your code with C.

Acknowledgements

Thanks to Jon Harrop for being my reality-check peer.