How are you using rustfmt and clippy?

Aesthetics have nothing to do with functionality and it doesn't require standard.
I consider my style of writing Rust code the best, but that doesn't give me right to enforce it on everyone else in community.

I'm afraid you are almost certainly right. Even though I have long thought it would be a great idea if compilers would reject badly formatted source.

I would hope then you refrain from making compilers

DoumanAsh,

Aesthetics have nothing to do with functionality and it doesn't require standard.

Mostly true. Although there certainly have been cases where bugs were introduced by maintainers as they misread some unusual code style. Some small argument could be made then that aesthetics can impact functionality.

I consider my style of writing Rust code the best, but that doesn't give me right to enforce it on everyone else in community.

If you ever publish your code as open source are you not forcing anyone interested in it to tolerate your style?

I would hope then you refrain from making compilers

Fear not. There are many other reasons you would not want to use any compiler I have ever written. Besides, I'm having a hard enough time getting Rust to do what I want :slight_smile:

1 Like

Hi ZiCog,

You (understandably) misunderstood the context of my comments and thus the experiment is confusing. We agree on issues of style where I additionally see reformatting for editing and then back to a standard format for distribution (merge) as ideal.

I was responding to the annoyance the severely disabled experience with spaces being used rather than tabs. You can probably type in at least a "hunt and peck" level of efficiency.

Brain interfaces have arrived (for some) but try typing Moorse Code by puffing on a straw. Appropriately called "Sip N Puff." ie. Really try it.

Yikes! You see, your argument still holds that lines of code per day is low and only the quality is central.

That isn't the point. The EXPERIENCE (feeling) involved in uselessly typing spaces is quite unpleasant. Even as an experiment.

1 Like

But I don't have the experience (feeling) involved in uselessly typing spaces. I just hit the TAB key and it tabs over to the right place. Except it's inserting 4 spaces to so.

Surely the same can be done with any input device that has a TAB input?

Actually, I might be softening my view that typing speed is never important, after watching Jon Gjengset churn out a TCP/IP stack in Rust in a live stream coding session : Implementing TCP in Rust (part 1) - YouTube

Impressive.

I really dislike meticulous formatting like this. Then during refactoring people have to be careful and mindful about the original intention and if it have changed now etc. Same with aligning stuff with spaces. Geee, who cares? If I wanted to admire real beauty I'd go to a walk in the forest or something. Instead I have to sit here and toy with someones silly ideas about how the code looks best.

All I want is to spit out the necessary code that works and has not bugs, not to toy with it needlessly. In two weeks I'll replace it with some other code anyway, because requirements / ideas changed.

So I guess it all comes down to the attitude. Mine is: "Bring in rustfmt bulldozer and beat it all into standard form, then go do something better with your time." :smiley:

1 Like

That was a petty or unproductive comment about compilers. Ambiguous syntax is a central issue for these folks and of course bad formatting style can be valid syntax.

That is a great idea but belongs in the version control or precompiler stage. That is one purpose of a lint for example and thus is addressable.

If anyone here tells you that is not a deterministic process I would skip to the next comment.

You are the first person I encountered that explained that structured use of white space in areas such as graphics programming is important to productivity and readability.

So... I have the view this would be controlled via attributes (or macros) but given there would still be preferences it requires very careful choices to accomplish this in any ecosystem.

2 Likes

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.