So there is apparently a problem with languages such as JavaScript and the solution is to use languages such as TypeScript.
Wut?
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
So there is apparently a problem with languages such as JavaScript and the solution is to use languages such as TypeScript.
Wut?
Well, yes. TypeScript mitigates one big problem with JavaScript (type safety). That’s why it exists. It’s a dumb idea to choose vanilla JS over TS if you’re starting a new project today, IMO.
Whether or not you should use TS as your core language is debatable and situational, but in terms of using TS instead of JS, yeah, that’s a no brainer.
Some people disagree with it being a no brainer.
Just don't do bugs. How hard is that?
According to all teams I've worked on.
Pretty fucking hard.
I know this is satire, But really though better languages that make various classes of defects unrepresentable reduce defects. It's wild that such a statement needs to be made, but our industry is filled with folks who don't critically think about decisions like these.
If I don't have documentation or defined features, then I can't do bugs!
The evolution strategy: if you don't know what you're doing, every function is a feature!
Like the age old advice for getting better at Smash Brothers - Don't get hit.
don't just m-dash
chat gippity
Maybe, but always remember LLMs are trained on real people. Some people naturally use similar styles to some LLM tica as it was stolen from them in the first place.
If you see more than 3 EM dashes in a body of text, it's 100% AI. I have found random online articles where there is at least two em dashes every paragraph. No human wrote that shit. A human is lucky to get away with one em dash (and it's been that way before AI).
one heartbroken anti-AI human who loves em dashes replying ☹️ we're split into two classes: the type who abandons our typing habits to avoid being told our human efforts are definitely AI, and the type who stubbornly carries on using em dashes
Don't just state—regurgitate!
I'm not even going to bother commenting on that train wreck of a post, but I just wanted to mention that I hate the writing style of programming-related LinkedIn posts. They're just chock-full of sweeping generalizations presented as absolute truth in an extremely patronizing tone.
Why can't people just say, "In my opinion, X technology is a better fit for Y situation for Z reason," instead of "Every time you encounter X, you must do Y, otherwise you're dead wrong."
It's just simultaneously so arrogant and also aggressively ignorant. If someone spoke to me like that in real life, I would never want to speak with them again. And these people are broadcasting this shit to their entire professional network.
Yeah, particularly the broadcasting really irks me.
That is an opinion you can hold for yourself and then make compromises as you encounter reality. I do expect programmers to hold strong opinions.
But when you broadcast it, you strip yourself of the option to make compromises. You're just saying something which is going to be wrong in one way or another in most situations. I do expect programmers to be smarter than that.
"Blame the author, not the language"
Says the person who screams they have never worked professionally with a team before.
There is no excuse to not use statically typed, safe languages nowadays. There are languages that let you build faster like Python and Typescript, but faster does not mean safer. Even if your code is flawless it still isn't safe because all it takes is a single flawed line of code. The more bug vectors you remove the better the language is.
Even if your code is flawless it still isn’t safe because all it takes is a single flawed line of code.
If there is a single flawed line of code, the code isn't flawless.
let you build faster like Python
I have to write so much boilerplate code to make sure my objects are of the correct type and have the required attributes! Every time I write an extension for Blender that uses context access, I have to make sure that the context is correct, that the context has the proper accessor attributes (which may not be present in some contexts), that the active datablock is not None, that the active datablock's data type (with respect to Blender, not Python) is correct, that the active datablock's data is not None... either all that or let the exception fall through the stack and catch it at the last moment with a bare except and a generic error message.
I used to think that static typing was an obstacle. Now I'm burning in the isinstance/hasattr/getattr/setattr hell.
There are definitely use cases where something like C is still the best option because it's faster. For the most part consumer software it's unnecessary, but it's not obsolete for all applications.
Python isn't "untyped;" it is, in fact, strongly-typed. (And is markedly different than and superior to JavaScript on that point.)
This rant feels like it was written by an OO programmer who was never able to wrap his head around functional programming.
Yeah, plus it has type hints and tooling to make said type hints mandatory.
Also, like, fuck golang, it's such a shit language and the compiler does very little to protect you. I'd say that mypy does a better job of giving you AOT protection.
Go and Python and Typescript all have their own footguns.
I assume Rust is the same, but haven't used it personally to see
Rust is the foot gun, it's so perfect that you genuinely cannot just sit down and type out what you need.
Skill issue
- sincerely, someone making a DST crate
EDIT: To clarify...
There are some things that are only doable on nightly Rust (like specialization, const fn in traits, etc.) and the reason for that is to avoid future issues. In that regard, Rust will not be as good as C++... at least until those get stabilized.
Some of the nightly functionality (like ptr_metadata) can be achieved with unsafe code and it's fine to do that, as long as it's only done when necessary and it's properly documented.
It's okay to want to use C++, but that language has it's own issues and footguns (virtual destructors, "move semantics", C-style casts, header files and more) that Rust wants to avoid.
EDIT 2: Specialization is also kinda doable with deref coercion, but that's another can of worms I don't wanna open here.
EDIT 3: And if I had to mention some of Rust's footguns:
unwrap panics, which isn't bad in and of itself, but it's short so you'll probably want to use it instead of other error handling methods (see recent Cloudflare outages)unsafe functions implicitly allows using unsafe operations (fixable by adding #! [deny(unsafe_op_in_unsafe_fn)])For my own Rust project I require myself to have a comment for every unwrap call that explains why that unwrap will never panic. For everything else I let the function return an error, with help of the anyhow crate and error contexts.
it's just negligence with better marketing
Good damn I hate that tone it reeks of LinkedIn llm-powered personal branding. Weak ideas with writing that tries to sound strong is the worst.
I don't get it.
Maybe the joke is nothing complex is written in fad languages?
Maybe the joke is the discounting of peer review and testing?
Maybe the joke is the lack of devops knowledge where Python is extra steps over other scripting languages?
It seems like promotion of fad languages. When I was younger, I chased fads and lost hard. I'll stick with C and C++. Run-time failures happen to everyone including fad languages. Here's looking at you Rust CVE's. Better to have loved and lost, something, something.
Plenty of complex things have been written in fad languages. And not only complex things, COBOL was one of the biggest fad languages of all time.
I'm completely confused by why they seem to think it's impossible to have coding errors in rust. I'm also confused as to why they seem to think that errors are actually a problem. You get them you fix them. Who cares about what language you do it in.
This stinks of somebody who's been in the industry for about 2 years and now thinks they're hot shit.
If the language makes common but dofficult to deal with error impossible, that's nice. Not critical, but nice.
If the language introduces easy to make and hard to deal with errors, that's an issue. Not a deal breaker, but an issue.
The idea does exist, but it's stated with way more confidence and finality than it deserves. That's social media I guess.
I still don't accept the fundamental core point of the arguement which is that rust necessarily makes it impossible to commit certain errors. Rust has its rules as such as only programming language does but that doesn't mean that mistakes are impossible.
The vast majority of errors are logic errors not memory leaks in standard functions.
I agree with the post. Setting up typescript takes an hour or two if you have no clue what you’re doing. In return you get the absence of (the equivalent of) null pointer exceptions.
I chuckle every time I find an NPE in the Java backend. Doesn’t happen to me. Can’t happen to me.
Sidenote, while I’m already gloating: Once the backend code had an error where they were comparing two different kinds of IDs (think, user ID and SSN), which gave wrong results. This error can’t happen to me either, because I type my IDs such that they are not comparable. A strong type system really is a godsend.
Nonsense. If your code has reached the point of unmaintainable complexity, then blame the author, not the language.
I feel like there's about one person that can cast this stone, and that's because preventing this has turns Torvalds into an abusive bridge troll sometimes, but he's actually been successful.
Sounds like they want Ada Spark and not Rust.
Spark's syntax reminds me of submitting an application to a bank before I had a permanent address.
Yes it looks like I'm checking all the boxes, but I have to fudge some requirements just to get the process running, and remind myself to update the details later
i laughed pretty hard thinking isn’t that just ada
so we got rid of ada for c++ now from c++ to rust chasing ada lmao