Programming with Beef: Open source language takes inspiration from C#

Share
  • January 10, 2020

What’s the beef? There’s a new open source programming language in town. Beef takes syntax and core library design inspiration from C# and was simultaneously developed alongside its IDE. Focused on performance, simplicity, and readability, it released to the public on December 31, 2019 with version 0.42.1.

Check out its GitHub repository and its homepage.

Design goals

According to its design goals, Beef aims for high-performance execution with minimal runtime, no GC or ref counting overhead, and no JIT delays.

Its overview states:

Beef is a performance-oriented compiled programming language. The syntax and core library design derives from C#, but there are many semantic differences due to differing design goals. The language has been developed hand-in-hand with its IDE environment, and careful attention has been paid to the holistic pleasurability of developing Beef applications. The intended audience is the performance-minded developer who values simplicity, code readability, fast development iteration, and good debuggability.

Its (optional) safety features include detecting real-time memory leaks with the help of the debug memory manager. Since the safety features are all optional, users can disable them for different kinds of performance-critical builds.

Additional safety features include bounds checking for arrays, collections, spans, and strings and checking for explicit object casts to an invalid derived type at runtime.

SEE ALSO: C wins Programming Language of the Year award for 2019

Creating the programming language

On a Hacker News thread, the author of Beef commented about its inception and surprising background.

Author here. I’m the engineering co-founder of PopCap Games. I left PopCap after the EA acquisition, and I’ve been working on this project mostly full-time for the last five years.
Before Beef, I was developing game code in C# and engine code in C++ and I felt C# was just much more pleasant to work with – faster compile times, better IDE tooling, better errors, etc. Then it struck me that none of the things I liked about C# really had anything to do with the JIT or the GC, and it may be possible to create a “best of” merging between C# and C++.

I know there are other “C replacement” contenders out there – the differences are probably best explained through Beef’s specific design goals listed at https://www.beeflang.org/docs/foreward/

Fans of C#’s syntax should give Beef a try and see how it fares.

Beef IDE

Let’s take a look at the custom created development environment.

Sample screenshot of the Beef IDE. Source.

The Beef IDE supports autocomplete, fixits, reformatting, refactoring tools, type inspection, runtime code completion, and includes a built-in profiler. Hot changes to the source code are allowed in the IDE.

Users can even use the IDE’s debugger in native applications, no matter what language they are written in.

Its CLI is called BeefBuild; both the IDE and CLI are written using Beef itself, while the core compiler is written in C++.

Testing it out

View some code samples in the language guide section of the documentation and get a taste.

Want to give this programming language a go? View the prerequisites for building from source, or download the current stable build.

The post Programming with Beef: Open source language takes inspiration from C# appeared first on JAXenter.

Source : JAXenter