Earlier quoted context omitted.
You can leave the inner type out... https://play.golang.org/p/m3bLmneArB
Ah, maybe it's when they're alias types that that wouldn't work?
You definitely need to specify the type for an interface, but that makes sense.
201–210 of 295 posts
Earlier quoted context omitted.
You can leave the inner type out... https://play.golang.org/p/m3bLmneArB
Ah, maybe it's when they're alias types that that wouldn't work?
You definitely need to specify the type for an interface, but that makes sense.
Are there plans to do user studies? 10 minutes watching new users code in Rust will give you better ideas than 10 weeks thinking about the problem in your head. I feel like there's a real lack of user testing in software development tools land. If you're developing software for unsophisticated users it's obvious that you should be doing user testing, but it's an often ignored fact that developers are users too! APIs,…
"If you're developing software for unsophisticated users it's obvious that you should be doing user testing" Compilers actually have a unique opportunity to introduce some form of opt-out tracking of all of the compilation errors with sources, etc. This could really help to understand the users.
This means the user might have struggled a long time with the code before even hitting the compile button. If you only collect statistics from compilation you will miss all this pre-struggle.
"Idea: implied bounds" sounds like a very interesting idea. It is a pain copying the bounds as author mentions. I also have worked with library code that does not consistently use trait bounds and it can lead to very confusing errors. The thing that keeps getting me now is there are so many types moving around with generics and traits. It would be nice if it were easier for something to be object safe and/or Any was…
I still can't get my head around rust. While all those features definitely make sense, I find it very confusing sometimes. Is there something like rust for c++ programmers?
Curious, is it harder for c++ programmers to learn Rust than dev from higher level devs? Because ive seen Rust has a lot more success recruiting devs from python, js, even php.
There are two main communities in C++, those that embrace safety and take advantage of the language features to improve their productivity, while going down to lower level constructs if performance needs an extra push.
Then there are those that are kind of exiled C developers using a C++ compiler, forced to migrate to C++ on their work, trying to use it as C with C++ compiler.
This is the group that has more issues with Rust.
Earlier quoted context omitted.
I suppose the question then is, did writing Unix make C ergonomic? :)
Good question :) I think it did, though I'd be interested to hear an informed opinion.
https://www.bell-labs.com/usr/dmr/www/chist.html
The best part for those that care about security:
"To encourage people to pay more attention to the official language rules, to detect legal but suspicious constructions, and to help find interface mismatches undetectable with simple mechanisms for separate compilation, Steve Johnson adapted his pcc compiler to produce lint [Johnson 79b], which scanned a set of files and remarked on dubious constructions."
So although C designers saw the dangers of C and provided static analysis from the early days, many C developers keep ignoring them.
Earlier quoted context omitted.
Good question :) I think it did, though I'd be interested to hear an informed opinion.
I, for one, see C as both unsafe and unergonomic. The many features of C++ can be seen as various attempts to make some or another thing expressible in C -- parameterized datatypes, namespacing, encapsulated resource management -- that wasn't before.
Hence why he started to design C with Classes after getting his job at AT&T.
https://www.youtube.com/watch?v=ZO0PXYMVGSU
Around 29:00.
After writing Rust in production for a while, the biggest bugbear I have is the naming/file structure. I end up a lot with this; src/main.rs src/combobulator/mod.rs src/combobulator/tests.rs src/tests.rs src/somethingelse/tests.rs src/somethingelse/mod.rs Because I find tests in the same file a bit confusing. It's really easy with maven-style layouts to know that "only things in main/java or main/scala get compiled a…
I'm really encouraged by this post. I ran into a situation somewhat related to the borrowing in match patterns this week [1], and whilst it's only a mild annoyance, it's lovely that it might get smoothened out. Today, i started using modules in anger, and was immediately mildly annoyed by the need to explicitly reference crates in my code, when they're already in my Cargo.toml, and to declare modules, when they're im…
Earlier quoted context omitted.
I also had problems understanding this whole crate system when I was playing with Rust.
This is extremely common, and is one of the reasons why it's such a big part of this post.