" Next time you're in a conversation about language design and someone sighs, shakes their head and tells you that sad legacy design choices are just the burden of the past and we're helpless to avoid repeating them, try to remember that this is not so." I think rust is neat, but this is somewhat arrogant. Rust is amazingly young . 10-20 years from now, when rust hopefully has bajillions of users, if this is still tr…
Things Rust shipped without
281–290 of 330 posts
Re: Things Rust shipped without
#282Earlier quoted context omitted.
I'd need to recheck my vocab, but I'm pretty sure aborting is always safe.
Not if you want to write an OS.
Re: Things Rust shipped without
#283Earlier quoted context omitted.
Precompiled headers are a big hack. As pcwalton mentioned, the problem was actually solved when people invented real module systems.
Which, notably, happened decades before the first implementation of the precompiled headers hack.
Re: Things Rust shipped without
#284Earlier quoted context omitted.
We have an http://doc.rust-lang.org/stable/std/ffi/struct.OsString.html to abstract over a native string in whatever encoding your platform has. Generally, things that interact with the OS use these, and they can convert to a UTF-8 String.
Suppose I'm on Linux, but I want to interact with Windows stuff. (CIFS protocol, NTFS on-disk format, disassembler for Windows executables, Wine-like program, cross-compiler, etc.) I'll be wanting UTF-16 support. Going the other way matters too; if I'm on Windows I may need UCS-32 support.
Re: Things Rust shipped without
#285Earlier quoted context omitted.
I think the point of parent comment is "it's ok to don't have goto in Rust, but it's not the reason to be proud of just not having goto". Goto is important enough operator and doesn't deserve blind hate.
Agreed... I honestly tend to break code into a lot of discrete functions, and combine for workflows, but sometimes you just need to easily jump back a few places, and where goto is available it's not always a bad option. Just one that should be used sparingly... once in a complex workflow is fine.. more than twenty times in a few thousand line method, not so much.
"Just recently, however, Hoare has shown that there is, in fact, a rather simple way to give an axiomatic definition of go to statements; indeed, he wishes quite frankly that it hadn't been quite so simple....
"Informally, α(L) represents the desired state of affairs at label L; this definition says essentially that a program is correct if α(L) holds at L and before all "go to L" statements, and that control never "falls through" a go to statement to the following text. Stating the assertions α(L) is analogous to formulating loop invariants. Thus, it is not difficult to deal formally with tortuous program structure if it turns out to be necessary; all we need to know is the "meaning" of each label."
Re: Things Rust shipped without
#286Re: Things Rust shipped without
#287Earlier quoted context omitted.
Seven weeks ago today.
For version 1? Can we break on 2.0?
Re: Things Rust shipped without
#288Earlier quoted context omitted.
Most applications right now should do thread-per-request. Thread spawning is very optimized in both Rust and the Linux kernel, and you can adjust stack sizes if you need to. If you're hitting limits caused by this, you can use mio.
What about systems other than Linux?
Re: Things Rust shipped without
#289Re: Things Rust shipped without
#290Earlier quoted context omitted.
Which, notably, happened decades before the first implementation of the precompiled headers hack.
Yes. Well. And just a few short decades later, modules will most likely make it into C++17.
> Modules making it into C++17 is less likely.
However, they do say > That said, from a user’s perspective, I don’t think this is any reason to
> despair: the feature is still likely to become available to users in the
> 2017 timeframe, even if it’s in the form of a TS.