No offence

“You guys are stupid. See, they’re gonna be lookin’ for army guys.”

C or c++ should be the one in the back, pointing at things…

Absolutely…

And I’m the smalltalk soldier in my rainbow uni 🌈

jokes on you i code the entire stack in JavaScript

Ok, admittedly I was using typescript but honestly, I really enjoyed using JavaScript. I kinda feel like people who shit on it have never used it much, or aren’t very experienced, or it just wasn’t to their taste and they’re jumping on the hate train that the others like to conduct.

(I also understand this is a joke dw)

It’s probably also related to when a person first encountered JS. If you learned it pre-2015—even if you’re aware of the changes made in ES6—I can see how it would be hard not to view JS as cumbersome. I personally love to use it, but I can’t imagine that would be true without let, const, classes, etc.

Edit also block scoping and arrow functions!

Primal
link
fedilink
61Y

My feelings toward JavaScript depend on the context in which I’m using it. I really like JavaScript in a React app or Next.js, but I don’t care for it in Views and Razor page in .NET web applications, though it’s getting better.

I kinda feel like people who shit on it have never used it much, or aren’t very experienced

How much experience do you have? (and don’t even think about lying; this is the internet)

Definitely 2023 years worth of experience. I taught Jesus himself JS. Which, fun fact, doesn’t stand for JavaScript, but stands for JesusScript. I would never lie on the internet.

(4ish years lmao)

4 years isn’t enough to hate javascript. Either those 4 years are entirely in JS, in which case it’s all you know and thus you lack perspective. OR, you spent e.g. 2 years with a different language and only 2 in JS, in which case you don’t have enough experience with JS to have an informed opinion.

Don’t worry though, we all started our JS hating journey like that. Give it a few more years and I promise you’ll be able to hate javascript like the masters.

10ish years here, I don’t hate js. The more modern tools, frameworks and typescript makes it awesome to use for frontend stuff.

I never said I had a total of 4 years experience, only that I had 4 years of JS experience.

But yes, I will work on honing my hatred. I hope to one day gain a seat at the JSith council and achieve the rank of master.

Let your anger flow through you.

We live in clown world

College literally tried teaching us programming with JavaScript…

It’s an easily accessible language, I started to learn with JavaScript as well. Easy to teach the basics.

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.

@Faresh@lemmy.ml
link
fedilink
English
21Y

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.

Fuck excessive type coercion. All my homies hate excessive type coercion.

We all know C# is the real clown.

Why?

Python is the clown of clowns

zbecker
link
fedilink
61Y

@Rooki @ghariksforge

I mean, python is named after Monty Python.

ah yes programming languages are jokes themselves, and not the programmers using the wrong tools for the wrong job

@Kryomaani@sopuli.xyz
link
fedilink
English
41Y

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’ve commented to my cow-orkers that “Typescript is the bag they put over Javascript’s face so you don’t have to look at it anymore.”

@ParsnipWitch@feddit.de
link
fedilink
English
71Y

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”.

@abraxas@lemmy.ml
link
fedilink
English
51Y

It was when better sandboxing came out and the only valid complaints about javascript became invalid.

I was there. It was a good time.

XMLHttpRequest

Probably when V8 came out. Also Node.js.

@abraxas@lemmy.ml
link
fedilink
English
2
edit-2
1Y

I happened to be a fullstack developer when the transition happened, so I saw it firsthand. I would say it predated V8 by a year or two. By the time V8 came out, I was already writing plenty of (simple) javascript for applications.

I would say it was more about plugged security holes and Ajax becoming more viable for real-world use. The “don’t ever use javascript” rule came from people disabling javascript because javascript was being used for malware. V8 was a part of that transition and growth, but at least in my memory not the shot that started it all.

There were developers (and books) pushing Rails+Ajax pretty hard in 2007, a full year before V8’s first release in September of 2008.

You’re right! I stand corrected and thank you for sharing. There were already big JS apps (notably, Gmail in 2004) before V8 came out. Yet, am I wrong to think Node.js started the JS obsession that lasted for a while?

@abraxas@lemmy.ml
link
fedilink
English
21Y

I think that’s a hard question. Node definitely helped evolve it. The idea of isomorphism was slow-growing (and yes, originally pretty rocky), but foundational to what we now see as web development. But if I really had to describe the start of the “JS obsession” by my experience, it would be the AJAX explosion, which led to the advent of the “web-based app”. That very first moment of realization that yes, you can do anything on the web. It might be hard for a developer who started after that time, but functionality used to be relegated to windowed and console apps. In that world, you could imagine how useless javascript must have seemed - why do I need to write code to give “functionality” to what was basically seen as a remote pdf?

But then, I think there’s no surprise to the fact every big company under the sun has some critical contribution to server-side javascript. Back then, most of the dev world were using Perl, Python, Ruby, PHP for their web backends (Java, VB, and C# were used, but too damn hard to write in). At best, those languages were non-ideal but reasonably comparable to javascript. At worst, some of those languages (Perl, lookin at you) were worse than javascript at all the reasons people make fun of javascript now.

It took a while to kick Rails off the “next big thing” podium, but it was pretty quick that Node was showing offerings that were just better than Perl-catalyst or early Python-Django. It’s funny, Rails was the one with fancy ways to ship javascript from server routes (what a shit show that tech was) back when Node was establishing new best practices on non-isomorphic web apps. I remember when Hapi first came out, backed by Walmart. I then went from being a node hobbiest to believing it was the future. 1 year later I was running a scrappy little node team and we had this little $10M+ telephony app (of all things).

Thank you, that was an interesting read!

XMLHttpRequest

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.

@NotSteve_@lemmy.ca
link
fedilink
3
edit-2
1Y

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

C is the sniper you don’t see

And his companion is PHP, who wants to be just like his hero

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.

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.

Justin
link
fedilink
21Y

At the same time, C is the only stable ABI available for Rust.

@pingveno@lemmy.ml
link
fedilink
English
21Y

That’s true, but they’re working on an ABI implementation. It’s no mean feat with a language like Rust. A quick search around the Internet found various possible candidates, though many of the discussion threads have petered out.

Unicorn 🌳
link
fedilink
51Y

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!

Does it need replacing?

Unicorn 🌳
link
fedilink
21Y

I wouldn’t say “need”, but there are possible improvements to ergonomics and safety that wouldn’t make the language itself more complex or high level. I think it does its job quite well though and will be here for decades to come.

I’m not too familiar with C, but I was under the impression that C++ was deceloped as a superset to C, and was capable of everything C could do. Is that not the case?

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.

Compile times get insanely huge.

Compile a c program with gcc then with g++.

You will quickly see the difference in size

And speed too. A small program using only C features can compile 5x faster with a c compiler then a c++ one. (GCC will use c++ mode on a .cop file so make sure it is .c)

Ada has been around since 1983 and is objectively superior. Yes I will die on that hill.

It’s too bad programmers are all such egotards they think they can write bugfree programs in C, while whining about how “restrictive” a safe language like Ada is.

C is back at HQ with 2 Stars and enough political capital to serve till they die.

Python?

akari
link
fedilink
71Y

non taken (I dislike JavaScript)

Python knows where the real threat is.

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 120 users / day
  • 257 users / week
  • 744 users / month
  • 3.72K users / 6 months
  • 1 subscriber
  • 1.47K Posts
  • 32.2K Comments
  • Modlog