General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Anony Mousse
Kantan Coding
comments
Comments by "Anony Mousse" (@anon_y_mousse) on "Kantan Coding" channel.
Previous
1
Next
...
All
It depends on the case. This is why when crafting an example to make a point it's actually better to use a real world example rather than some bogus animal attribute garbage. For the given example it would be better to use a database and not write any individual code for any animals. Merely iterate the traits present per animal and there's no need for any custom code per animal. Then new animals and traits could be added in the future and the program would keep on working correctly. However, the example given in cases like this are never the real point that's being made. Abstracting too much can hurt readability and make code worse, but not abstracting enough can really bloat the code which also hurts code readability and makes it worse. It's a delicate balance that isn't always easy to find.
12
It's basically just generics and void pointers in one thing. It is weird that they use "interface" as the keyword for it though. I guess they figured a new and somewhat unique keyword was best to set it apart from every other language. I would've opted for no keyword and instead juxtapose the function name with the syntax for template arguments, which actually would work out really well for Go since the typename comes after the identifier.
2
I tend to pronounce abbreviations as their full name, such as etc. being et cetera, but initializations I don't really care and will often pronounce like a word, such as SCUBA and WINE.
2
@WackoMcGoose I think the difference is if it sounds good as a word. But since etc. is an abbreviation, I say et cetera, and I also don't like "etsy" as a pronunciation.
2
Absolutely deserves a heart.
1
I like to use `fzf` when downloading a bunch of projects from someone's GH. I've got a Bash script that I download the list of repos with and convert the JSON into a flat list, then use `fzf <repos` as the argument to `git clone` and just hit up and enter for each one I want. I could just use a for loop from the command line, but I can't think of a single time I've ever downloaded every project from one user.
1
I actually figured out that last example even with the poor naming scheme, but it's still poorly written even after renaming because it should just be `t = 1.08` with it later using `tc += p.P * t`. Of course, even that is still too simple because tax rates vary by jurisdiction and it should retrieve the tax rate from a database or other resource. For instance, where I live the sales tax, including state and federal, would be 8.25% and thus the multiplier should be 1.0825 and not 1.08 . But perhaps that is too nitpicky.
1
Technically those are all the same flaw, trusting user input, but they do take place in different contexts, so it's fine. Every programmer should always be aware that if you're writing production code, don't trust user input at all. You can't trust users even a tenth as far as you can throw them.
1
Nice. I didn't know that Kotlin had F-strings by default. I can't say as though I really like the list comprehension transformations, but it looks like Julia and Python have the cleanest for loops. I think for most things, generator patterns are probably the wrong way to go because it's slower, but it depends on what you're doing. I also kind of feel like the trait composition that Rust and a few other languages use makes it more difficult to define and implement an interface. Of course, now I wish I had already learned Kotlin years ago, because who knows what other good features it has that could've inspired me in designing my own language. I decided on F-strings by default not because of being inspired by a language which did, but because Python's F-strings annoyed me.
1
@kantancoding I'll have to remember to post a link when I finally publish it. I'm still working on writing the ARM code generator, so that may be a while yet.
1
@VladSyrota Funny thing is, there actually are open source antivirus programs. Look up ClamAV.
1
I think it's fine to pronounce enum that way because it is short for enumeration. I pronounce char as care because it's short for character.
1
Her daughter is named "Help! I'm trapped in a driver's license factory!"
1
@BellatrixLugosi Every coding paradigm has its place, but like I said, everything should be balanced. Too much of any one thing can make it worse.
1
Previous
1
Next
...
All