Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tatterdemalion
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
11 ms
·
61.
▲
by
tatterdemalion
10y ago
In the standard library today, there's no bounds on `K` on the definition of HashMap, only on the impl block containing its methods. This sort of makes HashMap a bad example for this code block; you're right that if the bounds wer
62.
▲
by
tatterdemalion
10y ago
You want textual macros. Rust doesn't have this feature, it has a syntactic macro feature inspired by the Lisp family. Sorry.
63.
▲
by
tatterdemalion
10y ago
DatatypeContexts turns on a feature that Rust already has - constraints on type parameters to datatypes. This is about propagating constraints from the datatypes to functions over it. Haskell hasn't found DatatypeContexts very useful,
64.
▲
by
tatterdemalion
10y ago
We use crater to check potentially breaking changes against our entire package ecoystem, but its not as easy to test which of two syntaxes for a new feature will be easier to use by looking at existing code.
65.
▲
by
tatterdemalion
10y ago
When we're trying to balance a trade off, I often wish we could just do A/B testing on it, but that's not realistic for languages.
66.
▲
by
tatterdemalion
10y ago
You should put your reputation on the line when you make such vile comments. Your profile says you're the "technical founder on a bootstrapping startup," I want to make sure I never use your product, do business with your c
67.
▲
by
tatterdemalion
10y ago
> Oh, I guess the case of this I encountered most recently was actually Option<String> == Option<&str>. There are pretty rough type inference issues preventing this impl from existing. Too many people are doing `opt ==
68.
▲
by
tatterdemalion
10y ago
That wasn't meant as a critique per se, the only thing that's your mistake (rather than a paucity of APIs) is the into_owned bit, and we want to deal at the language/std level with a lot of the common cases where type errors
69.
▲
by
tatterdemalion
10y ago
Maybe, recognizing that your vantage point is not absolute & people who disagree are not just miscreants leading the flock astray, you shouldn't be "quite concerned" that other people had a different experience using a to
70.
▲
by
tatterdemalion
10y ago
It may surprise you to learn that I was already aware of all of the languages you mentioned, and yet I still asserted that Rust gave you more than just performance. I specifically asserted that Rust is capable of typing imperative code in
71.
▲
by
tatterdemalion
10y ago
It seems like you're using the url crate but a different version from what I have docs for (the path() method I see doesn't return an iterator). But I believe that some of those conversions are not optimally necessary. Definitely
72.
▲
by
tatterdemalion
10y ago
I think a key fact about this example is that `&Y` is just another type of value which can be used like any other; if you can't return it our put it in a vector or whatever its really not comparable.
73.
▲
by
tatterdemalion
10y ago
All due respect, but I would be extremely surprised to learn that this feature is as capable as Rust's lifetime system. Whiel you've shown that you can't have an escaping reference to a local variable, what Rust provides goes
74.
▲
by
tatterdemalion
10y ago
You're not wrong. I think the reality is that the design patterns for using Rust are still emerging from our shared experience; trying to write that sort of book would be putting the cart before the horse.
75.
▲
by
tatterdemalion
10y ago
You are correct, you essentially never need to manually free memory.
76.
▲
by
tatterdemalion
10y ago
While obviously no type system can prevent all logic errors, an expressive type system is very valuable to avoiding these kinds of errors (in my opinion more valuable than the loss of overall expressiveness types imply, but that debate is a
77.
▲
by
tatterdemalion
10y ago
Fortunately the number of businesses that have to value correctness, craftmanship, safety, or performance over 'moving fast and breaking things' is not that high in order for Rust to succeed. I would agree that it will always be a
78.
▲
by
tatterdemalion
10y ago
My rough approximation is that the difference between a sound type system and an unsound type system is that a sound system rejects some valid programs and unsound system accepts some invalid ones.
79.
▲
by
tatterdemalion
10y ago
Indeed! I don't believe that there are tools with a lower learning curve that solve the same problem Rust does - in particular my belief is the way that Rust is able to perform deep type analysis on imperative code (which is really wha
80.
▲
by
tatterdemalion
10y ago
Please read my comment more carefully. My argument has nothing to do with safety, and flippant replies are quite rude. > I believe that the rules of Rust not only give you exceptional performance without memory issues (as this article tr
81.
▲
by
tatterdemalion
10y ago
I am a volunteer who works on Rust & I do almost all of my open source work in Rust. I am paid as a Ruby web developer. I personally have little interest in systems programming & want Rust to be a productive language for application
82.
▲
by
tatterdemalion
10y ago
I don't know much about the Go compiler internals, but it sounds like in most cases (possibly all) the object being referenced in that way will be heap allocated; the entire point of this article is that no matter what (across function
83.
▲
by
tatterdemalion
10y ago
You've missed a critical point in the article: the structure does not have a pointer to something it has a member inline within its stack representation. Any garbage collector could (with some overhead) prevent invalid memory access
84.
▲
by
tatterdemalion
10y ago
This is not a great way to ask a question. Your degrees and years of experience are not relevant to understanding the subject matter of this post. In order to enlighten you, we'd need to know what specifically was confusing about this
85.
▲
What Rust Can Do That Other Languages Can't
(robert.ocallahan.org)
273 points
by
tatterdemalion
10y ago
|
245 comments
86.
▲
by
tatterdemalion
10y ago
Its true, in many of the points for which Uber is criticized (including this), Lyft is no better. One might even go as far as to say something along the lines of "there is no ethical consumption under capitailism." But the point o
87.
▲
by
tatterdemalion
10y ago
Your point is sound but that's an incredibly bad example. Mexico was already embroiled in the Mexican Revolution by the time WWI started. > "This armed conflict is often categorized as the most important sociopolitical event in
88.
▲
by
tatterdemalion
10y ago
Copy is essentially operator overloading (it is a simplified, restricted, moves-or-doesn't overloading of the assignment operator), which is always implemented through traits. I agree that operator overloading complects the behavior of
89.
▲
by
tatterdemalion
10y ago
Your invocation of Rich Hickey's excellent talk is very confusing to me. It seems like you're using "simple" the way that he used "easy." What is "complected" in Rust's type system? Just because
90.
▲
by
tatterdemalion
10y ago
The main blocker on stable was a feature called "custom derive" or "macros 1.1" which will be stabilized in the 1.15 release in February. At this point any library tied to a specific nightly is using some extremely cut
More ›