No offence
C is the sniper you don’t see
C is back at HQ with 2 Stars and enough political capital to serve till they die.
And just like in Metal Gear, he dies of old age if you wait a bit.
C is old, ubiquitous and still does not have a good replacement for its low-level cross-platform usecases, so I’ll believe it when I see it 😄
Rust is doing a very decent job of low-level cross platform. C just has a very long history.
Its cross-platform support (not just for using but also for building it) is not there yet, and it is quite huge and unstandardized with only one full implementation. I’d agree the last part will change with age, but given the frequent large changes and feature additions I am afraid it will be harder and harder and it is simply too complex and fast-moving for many low-level applications. It is closer to C++ than C in my eyes. I’d be happy seeing it replace C++ though for its memory safety benefits!
Rust won’t replace c.
The programs are too bloated for many embedded systems where every byte counts because it’s in ROM or loaded jnto IRAM
All that memory safety and garbage collection, for example, comes at a big cost
garbage collection
I don’t think Rust has a garbage collector.
deleted by creator
I mean yeah, if you restrict yourself to the C part of C++ it can do everything C can. But then you’re not getting any of the advantages of C++.
Once you start using things like classes and templates heavily, your program will quickly outgrow low-end hardware.
“Outgrow low-end hardware”?
What does a programming language have to do with this?
Everything.
Every programming language is an abstraction layer between the programmer and the machine that will run the code. But abstraction isn’t free. Generally speaking, the higher the abstraction, the less efficient the program.
C++ optionally provides a much higher level of abstraction than pure C, which makes C++ much nicer to work with. But the trade off is that the program will struggle to run in resource constrained environments, where a program written in C would run just fine.
And to be clear, when I say “low-end hardware”, I’m not talking about the atom-based netbook from 2008 you picked up for $15 at a yard sale. It will run C++ based programs just fine. I’m talking about 8- or 16-bit microcontrollers running at <100 MHz with a couple of hundred kB of RAM. Such machines are still common in many embedded applications, and they do not handle C++ applications gracefully.
deleted by creator
python in the same league as cpp, rust and c# is the real joke
Pfhhh what?
it is a horribly slow, ugly language, with the most braindead scoping rules (apart from js, of course). The only fast parts of it are libraries written in other languages, because python itself is not up to the task for anything more than glueing code from other, better languages together.
Honestly JS seams saner then python, it’s wierd but rather sane. The only really bad parts of JS are the type coercing == and =! operators which are very broken
For example “” == 0 and 0 == “0” are both true, but “0” == “” is false.
this is an unpopular opinion of mine, but I think lua is, in turn, a saner version of js. Apart from the 1-based indexing (which really isn’t that big a deal imo). But I really love the stackful coroutines.
I haven’t worked with any 1-based indexing languages, but I can’t really see how it could be problematic. The only advantage I see about 0-based indexing is the simplicity in how the memory address is calculated. Just
arr + index × sizeof(member)
which I think even has its own MOV instruction on x86. But besides that I can’t see any more advantages. With 1-based indexing I see the advantage of the number of elements also being the index of the last element of the array, avoiding off-by-one errors when writing. Though, again, I’ve never used a 1-based indexing language.
C or c++ should be the one in the back, pointing at things…
Yeah, gonna have to disagree. If I had to choose between JS and Python, I’d shoot myself in the head.
Python is cool IMO, got loads of libraries and gets your little app up in notime.
Not for larger projects though.
JavaScript is like the unsafest language I have touched in the last 20 years, yikes!
Still would use it as a web front end instead of python ofc.
Is python really any better?
yes
-
loosely typed: python is the same
-
bad package manager: python is infinitely worse
- loosely typed: python is the same
false
- bad package manager: python is infinitely worse
don’t think so but ehy…
pip is the bane of my existence
Also python IS loosely typed. take a str and you can reassign it to an int or whatever
You clearly have no idea what you’re talking about. Python is strongly typed. What is is is dynamically typed, also known as “duck typing”.
Strong typing doesn’t have a widely agreed upon definition. Duck typing is not equivalent to dynamic typing.
Yep last time I tried python, it’s type checker was so, so much worse than typescript.
Everyone I’ve met saying python is better turned out not have used modern JavaScript/typescript.
I’m sure that’s the case, but the meme is not making fun of typescript, its making fun of his dad: JavaScript, maybe for not comparing to his son: typescript
You’re right about python being the same. Python doesn’t have a mature alternative to Typescript that launches it into having best-in-class type handling.
There’s so much that my C# devs can’t do with its horrible type system that Typescript “just does better”. At compile-time at least.
I used to work on a hybrid typescript/python product (some services js, some TS, some python), and the TS stuff was just faster-running, easier to iterate, and better. And story-point allocations consistently showed that for an excess of 20 devs working on those codebases.
As for pip/easy_install vs npm/yarn/pnpm… I’m curious what you think pip does well that yarn/npm doesn’t? I’ll say in my work experience there’s more/better enterprise private repository/cache support for node modules than for python modules. Using npm security databases alongside “known good versioning” allows a team of even 100 developers to safely add libraries to projects with no fear of falling out of corporate compliance regulations. I’ve never seen that implemented with pip
-
Python is as inefficient as js is ugly
Well done.
That is like a colleague farewell card that says, “Four years already? It seems like only six months with all that we have accomplished.”
Afaik JavaScript only runs in a browser. If you want to make a desktop app your only option is something like electron.
For example, you can’t make the equivalent of a bash script with JS, but it’s trivial with python. I don’t think you can do system calls at all with JS.
There are non-browser JavaScript implementations, the most well-known of which is node.js
jokes on you i code the entire stack in JavaScript
May i ask why everyone hates JavaScript so much? It’s not ironic it’s a real question, i can’t really get it, is it just because it doesn’t have types? Or there’s more?
I’m a backend engineer. My biggest issue with JavaScript is environments that use it in the backend.
JavaScript is designed to run in a way that continue to try to do things even when it’s running in to errors. But it does that because I’m a front end that’s what you want. In the front end, working but ugly is better than not working at all. In the backend that can be catastrophic, though.
It has a rocky start, and a lot of cruft from that era sticked around.
There are also a lot of horrible legacy projects from the pre-ES5 era which are a pain to work with. Often older projects were coded either before people knew how to do javascript right, or before the devs who wrote it knew how to write javascript right.
It has a lot of gotchas and an unstable ecosystem.
A lot of basic stuff is confusing of weird. How do you loop over an object? There’s like five ways. How do you declare a function? There are two very different ways that behave differently, and the new one has like five variations in its syntax that can throw you.
Here’s an example of something that continues to bother me:
const foo = "hello"; const bar = { foo: "world"}
What do you think bar looks like? If you thought it had a key of “hello” and a value of “world”, that’s sensible but wrong. It has a key of “foo”. Object keys don’t need to be quoted in JavaScript. If you want the key to be a variable you have to write it like
{ [foo] : "world" }
. Which looks like a list.There’s a lot of this kind of stuff in the language. Small things that once you know you can work around, but are still weird, annoying, and prone to causing errors.
The standard library historically hasn’t been very good. This has lead to many libraries being maintained by the community. But the community is fickle, and the quality of libraries is not guaranteed.
The standard library was bad at some basic operations, so underscore was created. But then someone made lodash, and most people (but not everyone!) moved to it. But then the standard library caught up some more, so maybe you don’t need either? When you start working on a new-to-you project you don’t know what you’re going to get.
Dates were a mess so momentjs got big, but now that’s deprecated. Move to datefns, which has a completely different interface.
Node releases a new major version every six months. Every six months! Python has been on major version 3 for years and has no plans for a version 4, for comparison. The constant version releases is a potential source for headaches.
In my experience many libraries are kind of fast and loose with major releases, too. It can be a pain to keep up, especially if you have peer deps.
The debugger is kind of bad. Sometimes it will pause but you typically can’t like treat it like a repl. Python’s, for comparison, blows it out of the water.
Many things are async in JavaScript. Sometimes you don’t expect a particular call to be async or you forget, and you have a bad time. The async/await keywords were a godsend. The giant stack of “then…then…then…” was not fun. Combine with the weak debugger and you have an extra bad time. I bet there are a lot of console.log(“code is here”) debug calls out in the wild because of this.
For your actual front end view layer, react is the current hotness. But older projects are still out there with angular, backbone, probably some with just jQuery. React isn’t terrible but how long is it going to be king? What breaking changes are they going to put out in the next version? The ecosystem is unstable.
Also redux kind of sucks. Not a fan of global variables. I think the community has moved on from redux though? Again, the ecosystem is unstable.
In my experience there are many developers who only know JavaScript, and they want to use it for everything. It is the dungeons and dragons of languages. Much like how it is frustrating when your friends want to run a cyberpunk murder mystery in Dungeons and Dragons, it can be frustrating when your team wants to write everything, even your backend, in JavaScript.
We had browser tests at one job. They’re a very synchronous thing. Open the browser, load the page, enter name and password, wait for login. We had all of this written in python working fine, but people wanted to switch to a JavaScript toolset. Sorry, I mean they wanted to switch to JavaScript but there were three different browser testing tools the different teams wanted to use. Because the javascript ecosystem is like that. After a more candid talk with one of the guys I knew personally, he admitted it wasn’t because JavaScript was the best tool but rather he didn’t want to use python.
I can’t authoritatively say this is typical, but in my experience I’ve had a lot of resistance from JavaScript devs using other languages. Again, I think it’s like DND. DND is a unnecessarily complicated game full of exceptions and gotchas. If that’s what you learn first, you probably think everything is like that, and why would you want to go through that again? But of the popular languages/games, javascript/DND are exceptional for their weirdness.
In fact, thinking about it for more than a minute, my current team lead is a JavaScript main and he’s great. Super willing to learn other languages and has never been pushy. So it’s definitely not everyone.
The stack traces tend to be kind of bad. In production shit is probably minified so you might get “error on line 1, column 4737373”. In other contexts you may get a few hundred lines of node_modules to sift through before finding your actual code.
At least jest and (react) testing library aren’t bad. Mocha + chai were annoying. Enzyme is not great. Again, things change rapidly. You might join a company and find they’re still using mocha and enzyme, and switching never gets prioritized. If JavaScript made things better without breaking changes or swapping to an entirely new toolset it wouldn’t be a serious problem, but the standard mode seems to be “fuck it let’s make an entirely new tool”.
The lack of type hints isn’t great. You can use typescript but that’s a whole new set of stuff you have to set up. Python also doesn’t have types but they managed to add them as an option without making us switch to like TypeThon. But that’s not the JavaScript way. If you’re not making a breaking change are you really doing JavaScript?
I could go on, but my cat is getting up to some bullshit and I need to see what he’s screaming about. Probably not JavaScript.
tldr:
- standard library kind of bad
- ecosystem unstable and of variable quality
- unpleasant personal experiences with JavaScript developers wanting to use it for everything
Gotta say thar for someone who is currently following a JavaScript course this is pretty descouraging ahaha
I gotta say i also fell in that category of people trying to use JavaScript for stuff that is not exactly JavaScript suited. For example i’m writing a little script that changes markdown links in some files using the fs node, this is probably better suited to do in bash or other languages but the first thought was: i know a bit of JavaScript and that took a lot of time, what would be the point of learning a new syntax with all the stuff i will have to learn only on js!
If it makes you feel better, many of the things you learn in JavaScript will be helpful in other languages. You already know what functions are, for example, so you don’t need to relearn that. Even though JavaScript has some weirdness about functions.
Let me suggest a simple exercise for you.
- Print “Hello world!” to stdout in Javascript.
- Show me the standard that guarantees that everything you’ve used exists and works as intended.
I’ll wait.
Show me the standard that guarantees that everything you’ve used exists and works as intended. I’ll wait.
I think you fail to understand the very basics of web development if you’re operating on the assumption that everything you need is always reachable.
In the browser you cannot access stdout, but you can use
console.log
to write to the dev console which is basically the same thing.In Node, you can use
process.stdout
.Both are available from the top-level
globalThis
objects that are part of each platform’s respective default library.And in GJS? All other runtimes?
In, say, C, such basic stuff is right there, in the standard.
Javascript isn’t even standardized, some ECMAScript is, so I don’t even know what we’re talking about.
All ECMAScript is standardized because that refers to the standard.
I think you’re discounting the different environments that JS runs in. Something like C runs in a much more uniform environment (the OS) while JS must be able to run in different runtimes. It’s like how windows has APIs that C can access, but obviously you can’t access them when running C from other OSes (forgive me if that’s inaccurate, I don’t use C often).
Making it an excellent choice for a programming beginner --sarcasm
It’s wild that Python is getting a shoutout over javascript despite being an even bigger loosely typed mess.
I think it’s partially because Python has a reputation as being a serious language for serious people because it’s popular amongst data scientists and academics, whereas Javascript is still seen as being popular amongst script kiddies and people building crappy websites for $100 / pop.
That being said, most of the time i hear javascript jokes at work they’re pretty tongue in cheek /ironic / the dev isn’t really hating on it. I have heard a dev or two make those javascript jokes with a more serious critical tone, and everyone tends to ignore them and not engage because they’re pretty clearly just haters who have a general tendency to dislike popular things.
If by «loosely typed» you mean weakly typed, then that’s not true. Python is a dynamically and strongly typed language. Attempting to do an operation with incompatible types will result in a TypeError.
>>> "3" + 9 Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate str (not "int") to str
You may be thinking of the following, but this only works because the
__mul__
and__add__
methods of these objects have been written to accept the other types.>>> "A" * 4 + "H" 'AAAAH'
I meant that you do not declare types and a variable’s type can change at any time.
Regardless of semantics, it results in code that is not scannable.
But it is in no way worse than javascript in that regard, though?
I don’t think static typing in Python is really so essential. I see it above all as a scripting language, so its applications don’t benefit as much from static typing as other languages do.
Maybe a better hypothetical python would have used some kind of type inference system, like in haskell, which allows for static typing while still allowing to write code unencumbered from types and stuff, but I really think, for Python’s target domain, its type system is actually adequate or good. Maybe its documentation could benefit from type hints, though.
But it is in no way worse than javascript in that regard, though?
No, but OPs original post was implying that it was better than JavaScript, when in my mind they’re pretty similar in that regard, with the major exception that there is no python equivalent of Typescript which is rapidly passing JavaScript in professional settings.
I don’t think static typing in Python is really so essential. I see it above all as a scripting language, so its applications don’t benefit as much from static typing as other languages do.
For a scripting language it’s fine, but problems arise when you start building giant applications with it (which does happen).
Python programmers, brace yourself for this…
Oh wait.
Because it’s inescapable. Web development is by far the most common type of programming work and even if you’re a backend developer you tend to have to touch javascript at some point, so everyone knows the pain of javascript’s foot guns and javascript has a lot.
The fact that it’s mandatory to do your work invokes bitterness in people. For backend, you can kind of switch around until you find a language you like. For frontend, it’s javascript or nothing at all.
Javascript as a language is very out of sync with other commonly used languages. Its footguns are very easy to run into. As a result you have a lot of rituals around just not shooting yourself in the foot. The rituals, libraries, and frameworks around avoiding Javascript’s foot guns have been very shifting and changing. Of course, because the javascript ecosystem changes far faster than other languages, there are a lot of rakes for developers to step on to add to the naturally existing foot guns.
Javascript as a language probably shouldn’t be the sole language of the internet for a variety of reasons. It’s a very hateable language because of how easy it is for newbies to make new terrible code and how common it is. Until something like WASM takes off, the downpour of hate for javascript will continue.
I believe the amount of hate and mockery Javascript receives is heavily skewed, simply because almost every programmer who is active today has at least some experience with the language, and with more users there are also more people capable of complaining about it.
I work with languages that are much worse than Javascript, yet they don’t receive nearly as much hate because hardly anyone uses them.
One that comes into my mind is ABAP:
What the fuck
My colleagues and I joke around that SAP stands for Sadness and Pain.
As you may know SAP is a German company and the name originally was an acronym for SanduhrAnzeigeProgramm, which translates to “hourglass displaying program” - a nod to when busy software would change the mouse cursor into an hour glass - since it was initially conceived as a hardware stress test software - expanding to employee stress tests was just the logical next step.
Things got weird when scammers found a new hustle charging hundreds of dollars per hour pretending it was an ERP solution or similarly outrageous ideas that non-technical people in all kinds of business fell for.
(copied from reddit before it gets deleted)
“You guys are stupid. See, they’re gonna be lookin’ for army guys.”
We all know C# is the real clown.
Python is the clown of clowns
I mean, python is named after Monty Python.
Every few years I go back to giving JS a chance and every time I’m left frustrated. At least it’s not as bad as it was a decade ago I guess
So bizarre how life experience drives attitude. I’m one of those who has worked in a dozen languages, and Javascript (well, Typescript now) simply wins out for me. I run a C# team right now (have been for nearly a decade), and I can say as much as I love my job I hate the language. We get less done with slower code and with more bugs and more (very talented) people than the little $10M operation 4 of us did with node.js a couple jobs ago.
And as an aftethought since language and tooling are different topics… the ops toolchains for javascript are so much better than anything I’ve worked in any other language. Code released to production often ends up costing us less (dollar value) in the time to deploy, and then less per-user and per-hour.
I know a lot of C# diehards and I respect their passion. I just cannot relate to their experience. And I can say that with over a decade of experience in many of the languages in the original meme.
PHP is the landmine they are about to step on.
Glad C++ will be the one step on it cause it deserves it. I’d take PHP over that shit any day
ah yes programming languages are jokes themselves, and not the programmers using the wrong tools for the wrong job
While true, there are some languages that are the wrong tool for every job. JS is one of them. I’ve dreamt of a future where web frontends switched to something sane but instead we got stuff like typescript which is like trying to erect steel beams in quicksand. For web frontends I can understand that historical reasons have lead to this but whoever came up with node thinking JS would be a great backend language has a lot of explaining to do.
I am also interested if anyone can tell me the exact time in our history when JavaScript turned from “Don’t you ever use that anywhere on your websites!” into “It’s basically every website”.
It was when better sandboxing came out and the only valid complaints about javascript became invalid.
I was there. It was a good time.
Come on, Javascript is pretty nasty. Trying to read that shit always gives me brain tumors. Why do they need to wrap every fucking thing in a function inside a function inside a function that is passed as a parameter to a function inside another function?
Like, bro, you know people are meant to understand what you just wrote?
It just gives too much freedom and people forget they need to write code that is easy to read for people who aren’t totally familiar with the code base.
They even bring that shit into typescript. Like they are already using a language that is meant to fix that shit and they are like, nope, let me create 5 nested functions just because.
Can you give an example of the multi nested functions? I was a TS dev for a while and don’t remember anything like that. Unless you mean the promise callback functions. Those were a mess but luckily we’ve mostly moved away from those
People creating functions as objects inside of other functions. A few days ago saw a person create a function with two object functions inside, then passed one of the functions as an argument to the other function. Then returned the second function.
It’s hard to find such a mess in other languages. Yeha, functions as objects are cool. Closures are also cool… But why abuse that shit?
Ahh I remember that sort of JS programming from way back. Do people still do that?? You can just create a class now
Python is rather the clown. As it is more Scratch than a programming language
dont listen to them my friend. python sucks. the only reason to use it is the libraries. otherwise use lua if you want a similar scripting language that doesnt care if you forget a space key
Someone tried to learn python and failed.
He mixed up spaces and tabs, threw the keyboard out the window.
Python is nice.
One of us has spent the last three months trying to help their client untangle their massive python monolith that makes all their in house engineers quit.
Python is a good language for writing a data processing script, not for building a large piece of software.
It sounds like the issue was devs creating a crappy monolith, not the language itself.
Python is an overall robust language that allows you to do basically whatever you want, and does it pretty well. You can even use C extensions if you want to get peak performance.
The two domains that I believe Python cannot easily work with, are IoT where the interpreter would be a bit too cumbersome for a low-power system, and web programming, where it would still underperform Javascript and Webassembly (even though I am guessing that with a better webassembly support of the browsers, it would be possible to reach a rather efficient interpreter in-browser that would at least reach performances similar to javascript, if not better. And even if slower, the better syntax and lack of absurd rules would be a clear advantage on JavaScript).
better syntax
Lol I was listening and intently considering what you had to say until this point.
Defending javascript syntax is not really a valid thing. Even js devs admit it.
Is it perfect? No. Is it inherently better than a language that mistakenly thinks that whitespace is more readable than braces? Yes.
White space delimiting is awful and near impossible to scan in yaml config files, let alone a real programming language.
even though I am guessing that with a better webassembly support of the browsers
Considering V8 overcame python in benchmarks nearly a decade ago, I’m not sure even some miraculous webassembly environment would put python faster than javascript in the browser of all places.
V8 does not quite compete with the big guns in the space (C, Rust, Go), but now that it’s only 2-4x slower than C++, it’s created this niche of “almost hardcore fast” for javascript that is just unlikely to be dethroned any time soon.
People fail to quite get how many leaps and bounds V8 has taken in the last 10-12 years. Javascript’s reputation of being “scripting language slow” is simply no longer the case and hasn’t been for an entire Era in software terms. Reasonably-written Javascript is now often faster than heavily-tuned Python, and well-written javascript is faster than reasonably-written C++. It’s not necessarily fair (like comparing modern solar to nuclear, with the absurd amount of money that’s gone into solar research), but I don’t see it changing any time soon.