Earlier quoted context omitted.
Python formatting is egregious though, with hopelessly long lines and no sign of where to break them up, or at the most weird places. Yes I'm one of those persons who adheres to the terminal 80 column rule, it's neat for splitting and cascades into many benefits. Python often looks like unkempt code to me, like the developer has no care for how it looks or layouts (which isn't true, it's Python's fault.) The forced i…
Doesn't Python have an autoformatting tool like gofmt or Prettier?
Still in love with Rust
41–50 of 186 posts
Re: Still in love with Rust
#42Earlier quoted context omitted.
Python formatting is egregious though, with hopelessly long lines and no sign of where to break them up, or at the most weird places. Yes I'm one of those persons who adheres to the terminal 80 column rule, it's neat for splitting and cascades into many benefits. Python often looks like unkempt code to me, like the developer has no care for how it looks or layouts (which isn't true, it's Python's fault.) The forced i…
Doesn't Python have an autoformatting tool like gofmt or Prettier?
Re: Still in love with Rust
#43Earlier quoted context omitted.
>big projects (my biggest project is 45k LoC) and it takes a couple of minutes to compile it I don't think 45k LoC could be considered big, and I _do_ think a couple minutes compile time is a problem. I say that as a C++ programmer, a full recompile will easily get me out of the zone
Out of curiosity, not to argue: how much time it takes in C++ to compile 45k LoC?
Re: Still in love with Rust
#44> Let's face it – typically developers are familiar with OOP, garbage collected, dynamic programming languages. I think most of these programmers, and their project are not the target of Rust? If you're writing Java/C# or higher level languages, you already made the choice to sacrifice some computing efficiency for programming efficiency. I always thought Rust was more destined to convert C and C++ (and D/Swift/Go ?)…
Re: Still in love with Rust
#45> Rust will force you to be a good programmer, > [if] you like it or not. This is probably the best in-a-nutshell statement that describes what a good programming language is for me. I had similar moments in the past. Before Python I cared about indention to some degree. But once I got used to the way Python forces you to indent your code, I came to the realization that this is pretty much the way I should format my…
Python formatting is egregious though, with hopelessly long lines and no sign of where to break them up, or at the most weird places. Yes I'm one of those persons who adheres to the terminal 80 column rule, it's neat for splitting and cascades into many benefits. Python often looks like unkempt code to me, like the developer has no care for how it looks or layouts (which isn't true, it's Python's fault.) The forced i…
This is the result of writing hopelessly long lines of code. Python doesn't force you to write long lines.
I've done it myself, many times, but gradually made efforts to avoid this. I'll move deeply indented code into a new function or split up a long expression with a temporary variable. If I run into a particularly hard-to-format portion of code, it's usually a sign of that my code could be better.
Re: Still in love with Rust
#46Earlier quoted context omitted.
It surely does, my Gtkmm demo application I wrote several years for "The C/C++ Users Journal" still compiles faster than the Rust rewrite in Gtk-rs, when doing fresh build or after minor changes. Lack of binary library support on cargo, not having incremental compilation and linking does hurt.
There is incremental compilation. And cargo doesn't recompile libraries every time. Not sure how you don't know it if you really use Rust.
Facts:
Incremental compilation from 1.24 stable: https://blog.rust-lang.org/2018/02/15/Rust-1.24.html
Cargo recompiles dependencies only after "cargo clean" or after Rust version update.
Re: Still in love with Rust
#47Earlier quoted context omitted.
Doesn't Python have an autoformatting tool like gofmt or Prettier?
Yes. Most of the projects now use black https://github.com/ambv/black
x[1][4] = a[2] + b[4]
Black will format like either of these: x[1][
4] = a[2] + b[4]
x[1][4] = a[
2] + b[4]
But not like either of these, unless you insert the brackets yourself: x[1][4] = (
a[2] + b[4])
x[1][4] = (a[2]
+ b[4])
Maybe this sounds like just one little problem but I think it's a fundamental flaw. I have seen the result of a Python formatter (not Black but had the same problem) applied to a couple of files and it's a total mess. I'd take inconsistent column widths over that any day. I asked the creator of black about it and he was pretty dismissive.Re: Still in love with Rust
#48> Let's face it – typically developers are familiar with OOP, garbage collected, dynamic programming languages. I think most of these programmers, and their project are not the target of Rust? If you're writing Java/C# or higher level languages, you already made the choice to sacrifice some computing efficiency for programming efficiency. I always thought Rust was more destined to convert C and C++ (and D/Swift/Go ?)…
I don't know the demographics/targets, but I come to rust from ruby. So does Steve Kabnick, the author of the Rust book.
What kind of projects do you work on, and what made you switch?
Re: Still in love with Rust
#49Rust is a wonderful language, but I still have the impression that it is not stable as of 2018. All the toys I've made to play with it during the last years went deprecated quickly, especially if you rely on the ecosystem of packages (web server, database, ...). In addition, there was this thread: https://internals.rust-lang.org/t/concerned-about-rust-2018-... All in all, Rust will be great when stable (including the…
In which sense? That dependencies evolved?
Re: Still in love with Rust
#50Earlier quoted context omitted.
Out of curiosity, not to argue: how much time it takes in C++ to compile 45k LoC?
Like the others say: depends. But wasn’t saying C++ compiles faster, just that I know from experience that anything over a couple of seconds can ruin your flow.