FAQ
Is it production-ready?
Section titled “Is it production-ready?”No.
What works today?
Section titled “What works today?”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.
Who’s “we”?
Section titled “Who’s “we”?”One person. “We” reads better in a changelog.
Why not just use Ruby?
Section titled “Why not just use Ruby?”Ruby is lovely, and if you don’t need static types or .NET, you should. See Amethyst for Ruby developers for what’s different.
Why not just use Crystal?
Section titled “Why not just use Crystal?”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.
Why not just use C#?
Section titled “Why not just use C#?”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.
Is it fast?
Section titled “Is it fast?”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.
Can I use it from C#?
Section titled “Can I use it from C#?”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.
Can I use NuGet packages?
Section titled “Can I use NuGet packages?”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.
Why the name?
Section titled “Why the name?”“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.
Why end?
Section titled “Why end?”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]).
Where do I report a bug?
Section titled “Where do I report a bug?”On GitHub. Given the changelog, please check the known issues first.