Live data from Hacker News

Ark – A modern systems programming language

ark-lang.org

11–20 of 55 posts

Re: Ark – A modern systems programming language

#13
post #3

A comparison with Rust would be nice.

Looks like it's basically Rust without the ownership, borrow checking, and a few other things. Think of C/Go(?) with a rust syntax, and a few more higher level things like boundary checking, unicode support, etc (I'm aware Go has unicode support, I mean C).

Rust provides a good solution to C++ legacy cruft, complexity, undefined behavior, data races and provides some nice new language features like ADTs, traits, etc. I find it ties the language feature together with a beautiful and well thought out syntax.

Still, because of tooling, direct C++ interop and familiarity we would have stuck with C++. The killer feature that elevates Rust above everything else - and made us switch - is the borrow checker.

Re: Ark – A modern systems programming language

#14
post #5
post #2

If all this is Rust with the syntax of go, aw heck that's all I ever wanted anyway.

wait, you don't like putting your List inside your Arc inside your Cell ?? ;)

You need those for memory safety. It is very true that you don't need Rust's memory safety features, such as Arc and Cell, if you don't want memory safety, but it's also not a very interesting observation.

Re: Ark – A modern systems programming language

#15

Here the example on the site: func main(): int { mut i := 0; for i I'm really curious about 2 things: that for seems to really be a while . Why := in the declare and = in the assignment?

Perhaps the author was inspired by the Go language, as those are both Go-isms: Go's only loop is a for loop, and := tells the compiler to infer the variable type when initializing.

In fact, this snippet is only a few deviations away from being valid Go code.

Re: Ark – A modern systems programming language

#16
post #6
post #2

If all this is Rust with the syntax of go, aw heck that's all I ever wanted anyway.

Although some bits of syntax are reminiscent of Rust, semantically it's not Rust in the slightest: "Ark is not a garbage collected language, therefore when you allocate memory, you must free it after you are no longer using it. We felt that, as unsafe as it is to rely on the user to manage the memory being allocated, performance takes a higher precedence. Although garbage collection makes things fool-proof and remove…

I really wish Rust was as great as you advocates say, but that has not been my experience. For background: I've been following it for a while now. About a year or so ago, I dove it into with enthusiasm, but I got bit when the sigils went away, and so I backed off until the 1.0 release. After the 1.0 release, I figured it was ready so I spent another couple of weeks learning the new way of things and really hoping that it would be my replacement for C and C++. I really wanted Rust to be great.

Unfortunately, it has lots of warts that have sent me crawling back to C++. Addressing the particular item you're talking about here, manually specifying lifetimes of objects is a cure that's worse than the disease. It's great when the compiler infers everything for you, but I'm never going to be able to explain the syntax or semantics of those ugly 'a marks to my coworkers who aren't interested in programming language theory.

Anyways, I've been tempted to write a full blog post listing all of my Rust complaints, but I figured it's better to just quietly let you guys enjoy your thing. However, whenever I see these advocacy posts from you and the other Rust honchos, I can't help but scream a little bit inside. It's really not as good as it could've been.

To be really specific: it's great that you got "zero-overhead memory-safety", but I can't even implement fundamental data structures without using unsafe blocks and lifetime annotations.

Re: Ark – A modern systems programming language

#17

How long before someone releases another language "to fix all the dangerous parts of C" -- but the twist is that this language is just C but it forces you into a `git add --patch`-style menu that makes you double check all your usage of malloc and free every time you compile?

bugs in C are often a lot less obvious then just malloc and free usage.

Re: Ark – A modern systems programming language

#18
post #6

Earlier quoted context omitted.

Although some bits of syntax are reminiscent of Rust, semantically it's not Rust in the slightest: "Ark is not a garbage collected language, therefore when you allocate memory, you must free it after you are no longer using it. We felt that, as unsafe as it is to rely on the user to manage the memory being allocated, performance takes a higher precedence. Although garbage collection makes things fool-proof and remove…

I really wish Rust was as great as you advocates say, but that has not been my experience. For background: I've been following it for a while now. About a year or so ago, I dove it into with enthusiasm, but I got bit when the sigils went away, and so I backed off until the 1.0 release. After the 1.0 release, I figured it was ready so I spent another couple of weeks learning the new way of things and really hoping tha…

>Anyways, I've been tempted to write a full blog post listing all of my Rust complaints, but I figured it's better to just quietly let you guys enjoy your thing

Please do. I'd love to hear your thoughts on issues.

Re: Ark – A modern systems programming language

#19

Here the example on the site: func main(): int { mut i := 0; for i I'm really curious about 2 things: that for seems to really be a while . Why := in the declare and = in the assignment?

Perhaps the author was inspired by the Go language, as those are both Go-isms: Go's only loop is a for loop, and := tells the compiler to infer the variable type when initializing. In fact, this snippet is only a few deviations away from being valid Go code.

Their compiler is written in Go.

See https://github.com/ark-lang/ark

Re: Ark – A modern systems programming language

#20
post #6

Earlier quoted context omitted.

Although some bits of syntax are reminiscent of Rust, semantically it's not Rust in the slightest: "Ark is not a garbage collected language, therefore when you allocate memory, you must free it after you are no longer using it. We felt that, as unsafe as it is to rely on the user to manage the memory being allocated, performance takes a higher precedence. Although garbage collection makes things fool-proof and remove…

I really wish Rust was as great as you advocates say, but that has not been my experience. For background: I've been following it for a while now. About a year or so ago, I dove it into with enthusiasm, but I got bit when the sigils went away, and so I backed off until the 1.0 release. After the 1.0 release, I figured it was ready so I spent another couple of weeks learning the new way of things and really hoping tha…

Don't hold back! :) Criticism helps us improve, as long as you can make it constructive and make at least a cursory effort to understand Rust's goals. As I've said elsewhere, if memory safety isn't a priority for your product then Rust may not be for you.

As for the lifetime annotations, we could be extending lifetime elision to more places, including to struct definitions, if people come up with rules that are easy enough to understand. I'd probably be for it, but there are others who think that if you go too far toward removing lifetime annotations then you actually make programs more difficult to understand and the language harder to teach. But that was also the argument against our current lifetime elision rules, which are pretty fantastic in retrospect, so I'm not particularly swayed.

Post reply on HN