What is Shadow?

Shadow is a type-safe, general purpose, systems language intended to be compiled to machine code. The reference implementation for Shadow uses LLVM, the same infrastructure that the C-family compiler Clang is built on, and targets the x86 architecture for the Linux, Mac, and Windows operating systems.

Shadow comes out of the C-like family of languages and shares some syntax with C and C++ but even more with Java and C#. It's a statically-typed language that emphasizes clarity. Don't get us wrong: Dynamically typed languages like Python, Ruby, and JavaScript are great for productivity, but sometimes you want stronger guarantees that a program does what you think it does. Ultimately, it's a question of the right tool for the right job.

Why can't a language be fast and safe?

It can! Sure, you have to pay for checks on array bounds and a few other things, but some trade-offs are worth making.

For hardcore systems programming, C and C++ have been the only practical options. Shadow doesn't allow direct pointer arithmetic like those languages, but for those rare situations when you need that level of control, the native keyword allows you to declare a method that can be implemented in C or raw LLVM.

The Java Virtual Machine is a great execution environment, but the overhead of dynamic class loading, just-in-time compilation, and other VM services is not zero, especially when it comes to memory footprint. Our goal in making Shadow was the best of both worlds: the modern syntax and safety guarantees of Java combined with the performance of C++.

But what makes Shadow special?

We're so glad you asked! Despite its roots, it's not merely an unholy amalgamation of Java and C++. It has a distinctive feel with unique features and syntax.

Here's a taste:

Methods that can return multiple values

Properties for easy member access

Immutable types and references

Reified generics

Signed and unsigned primitive types

Language-supported singletons

Garbage collection through reference counting

Built-in UTF-8 support

Want to know more? Head over to the Features page. If you have more general questions, check out the FAQ.

Shadow 0.7.5 has been released! Read the details on GitHub or head over to the Downloads page to try it out. Shadow 0.7.5 adds garbage collection, faster compile times, fewer bugs, and better Mac support!