Skip to content

FAQ

No.

The compiler can build and run a single file containing top-level methods and classes with properties, constructors and instance methods. Within those you can use local variables, arithmetic, string interpolation, if/unless, while/until/loop and return. Anything else is reported as an AM4001 error rather than compiled wrongly. The changelog has the full list, and the roadmap says what’s next.

One person. “We” reads better in a changelog.

Ruby is lovely, and if you don’t need static types or .NET, you should. See Amethyst for Ruby developers for what’s different.

If you like the look of Amethyst and don’t need .NET, you should really use Crystal instead. It got here first, it compiles to native code, and it works. See Amethyst for Crystal developers.

C# is a very good language, and it’s what Amethyst compiles alongside. Amethyst is for people who’d rather write users.select(&:active?) than users.Where(u => u.IsActive). See Amethyst for C# developers.

Amethyst compiles to .NET IL, so compiled programs run on the same runtime and JIT as C#. Whether the IL is as good as the C# compiler’s is a question for when the compiler can build something worth timing. Until then, see the benchmarks.

That’s the plan. am build already produces an ordinary .NET assembly. The design is for Amethyst classes to look like any other .NET classes from C#, with snake_case names compiled to PascalCase. See .NET Interop.

Not yet. Today the compiler builds a single file and can’t refer to .NET types such as Math. The project system, with am add for packages, is designed but not built.

“Amethyst” comes from the Greek amethystos, “not intoxicated”. The ancient Greeks believed the stone prevented drunkenness. The web framework is called Amethyst on the Rocks, which undoes all of that.

Because Ruby uses it, and Amethyst is meant to feel like Ruby. It also means indentation is for people, not the compiler. Visual Basic developers will feel right at home, minus the Sub.

Why are generics written with square brackets?

Section titled “Why are generics written with square brackets?”

They’re borrowed from Ruby’s RBS type signatures (Array[Integer]), which is also how Python writes them (list[int]).

On GitHub. Given the changelog, please check the known issues first.