General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Anony Mousse
Theo - t3․gg
comments
Comments by "Anony Mousse" (@anon_y_mousse) on "So I've Been Trying Other Languages..." video.
It's always the people that say such things who are the worst when it comes to actually respecting others' rights. The funny thing is they say everyone is welcome, but if you espouse even a glimmer of conservative thought they'll kick you to the curb.
2
I get why everyone thinks it's a valid argument to say that the formatter means no one has to argue over the format, but it's not actually valid. If you could keep your files in the format of your choice and when updating the repositories there would be a formatting phase that diff's the versions based on a minified version of the source and then others could reformat to suit their tastes on their end using a custom config, then it would make sense. Of course, that would require either an intermediate step where you copy all the source files to a second directory and then update the repository, or it would require a change to all versioning software. Since no one thought of either methodology, we're stuck here still bickering about formatting when we should just get on with our lives and write the code. All that said, the developers who maintain Go and all of the original creators can suck it hard because they've chosen to enforce a style that's garbage and have given an utterly braindead argument for why they have to enforce their rules. They're either lying or incompetent and in either case I don't want to use any software produced or maintained by such people.
2
@rlidwka I would say the only thing that can be done is to build out the infrastructure for such a system to work, maybe with a plugin to `git`, or maybe just editor bindings to automatically run a formatter on pushing and pulling commits and hope that the example set in using such a system gets copied by others. It would take a fairly deep analysis of how people actually style their code in each and every language which would require what is essentially a compiler for each language, so not at all an easy task. Languages like C and C++ would be easy since a large portion of what's needed already exists in various open source projects. As much as it pains me to say it, Go is practically done because of their unyielding design ethos and preexisting formatter. JavaScript has tons of formatting tools. Incrementally building the system out would be fine if the people pushing various languages contributed to such a project. Though, as far as I'm aware, there isn't currently an all-purpose code formatter.
2
Nope. There is no default formatting style with C. You choose what you want to do and the compiler doesn't care. You can even use Allman style bracing and it won't complain.
1
@thejeffkershner Back when I used it, I don't remember it having auto-formatting at all. I suppose it's possible I turned it off, because I hate that functionality, but then again, this was in the Win98 days.
1
@Mordinel Not according to the documentation on their website. Says you have to use BufReader to get buffered IO.
1
@SnowDaemon ¿Por que no los dos?
1
It's an utterly nonsensical default for a language to require you to configure the buffering that it does instead of defaulting to some standard good choice. I didn't even know that was its default behavior, but now that I do I'll add it to my list of reasons to hate Rust, so thanks.
1
@ReAnna__ It is a default because the sole in-language way of accessing files doesn't have a buffer. It is configuration because you have to account for it in your program very specifically with a separate interface. That adds overhead that shouldn't be there and isn't present in the basic interface in pretty much every other language. Since 99% of the time you're going to want to use buffering, that should be the default for the most basic interface. In my own standard library, I added an optional parameter to the File constructor that allows you to set a buffer size and make it unbuffered or even to finagle the amount of buffer. If the user doesn't specify, then it uses the platform default and is thusly buffered. Making it harder in the general case to satisfy the niche case is a bad move on a language designer's part. As for JavaScript and Go, they're bad examples of nearly everything. The fact that much of the standard library in Go isn't marked as @nogc even when a given function performs no allocations is extremely annoying. For reference, you can easily use a function marked @nogc from either side of that equation, but one which is not marked as such you can't use from an @nogc'd main(). For example, write*() functions. And no, telling the compiler to turn off all GC is not a valid alternative.
1