Lurker News

Comments (277) 54 threads

Earlier comments
0xBA5ED1 reply#
This project would benefit greatly from a bulleted feature list with the best features at the top. The lofty goals should be _under_ that imo.
HoppyHaus#
Looking lightly at some of the code and the screenshot provided, I'd like to compliment on the look of the language. A lot of the newer languages coming out mess with the "normal syntax" way too much, which discourages me from learning it. Beef actually looks like I could sit down, and learn the features of the language, rather than relearning a new syntax that wouldn't translate well.

I wish you luck!

vmchale2 replies#
It looks like it's not memory safe? What does this offer over existing options?
beefdev2 replies#
There are some optional memory safeties, including real-time leak detection, but this language targets an audience who value performance over total memory safety.

For someone looking for a C replacement where memory safety is absolutely critical (ie- open server applications) then Rust may be a better fit.

vmchale2 replies#
> value performance over total memory safety

Is there any evidence this is a tradeoff? What of linear types?

NilsIRL1 reply#
> Is there any evidence this is a tradeoff?

Bound checking often is the reason rust performs worse on some benchmarks. Though I wouldn't consider this a problem at all since it can be disabled.

Continue this thread — 1 reply

PeCaN1 reply#
Linear types (and affine types, as in Rust) only buy you some memory safety (preventing use-after-frees, and memory leaks although that's not really a safety issue).

The more important part of memory safety is preventing out-of-bounds accesses. Rust, Ada, and (it seems) Beef sacrifice performance for memory safety here by having runtime bounds checking. (Though there is not much performance cost to this and all of those have options to turn off runtime bounds checking anyway.)
The only performance-oriented language I'm aware of that is fully memory-safe at compile time is ATS‚ via a combination of linear types and dependent types, and using ATS is… cumbersome.

Continue this thread — 1 reply

unlinked_dll#
leaks aren't unsafe though. Things like bounds checking and aliasing guarantees are like 90% of the memory safety issues you care about, and those can be performant.
rob742 replies#
It seems to have some memory safety features:

https://www.beeflang.org/docs/language-guide/safety/
> Leaks can be detected in realtime with the debug memory manager. Reachable memory will be continuously traced at runtime and memory which is no longer reachable but has not been properly freed will be immediately reported as a leak...
Sounds like it doesn't have a Garbage Collector, but a "Garbage Detector" that's only active for debug builds?

vmchale#
That's still not the same as affine/linear types, which other languages offer.

Also, testing helps detect bugs, but cannot guarantee security.

beefdev#
Yes, this is right - there is what is essentially a fully-functional "garbage collector" but its only job is to detect leaks in debug builds. Well, it also is used for detecting illegal memory layout changes during hot code changes...

One may say "then why not just make the GC optional like D", but when you design a library you really need to either design it for a GC or for manual memory management. Even for the basic string type - if Beef was a GC'd language then String would be immutable, but it's not so String is mutable. Totally different designs.

sida2 replies#
May I ask something that could be rude, how have you been paying the bills if you have been working on a language full time for the last 5 years?
beefdev#
I'm a co-founder of PopCap Games. Sold to EA in 2011.
wallawe#
From wikipedia[0]: "Electronic Arts announced it was acquiring PopCap for $650 million with an additional $100 million stock option."

He's probably got enough runway for a couple centuries..
[0] https://en.wikipedia.org/wiki/PopCap_Games

Load more comments