Live data from Hacker News

Pointers in Rust: a guide

words.steveklabnik.com

31–33 of 33 posts

Re: Pointers in Rust: a guide

#31
post #16

Earlier quoted context omitted.

Unfortunately I don't still have the code I was writing to tell you exactly, but the main issue is that you can't write generic functions because some times your usage will need to pass in a reference, some times not. The map and filter functions are examples of this. My hello world for evaluating a language is this: write a program that sums its arguments. It's arguments might be numbers or strings so you have to fi…

> Unfortunately I don't still have the code I was writing to tell you exactly, but the main issue is that you can't write generic functions because some times your usage will need to pass in a reference, some times not. The map and filter functions are examples of this. Usually you pass references, because that's the most generic option. I wouldn't say "you can't write generic functions", but you sometimes have to ad…

"It basically sounds like you weren't using the low-level features of Rust, which are important for our use cases but not important for everyone's."

But even in a system level program, how often do you need low level features of the language. I think the answer is "very seldomly", and hence, these low level features should be tucked in behind the higher level abstractions. They should be available only when required.

Re: Pointers in Rust: a guide

#32
post #14

Earlier quoted context omitted.

Lua

What kind of project was it that both Lua and Rust were in the running? Those are pretty much on opposite ends of spectrum, at least the spectrum of imperative languages with functional parts.

Don't forget that you can embed Lua in a collection of C libraries, and thus: do system programming with it.

;)

Post reply on HN