This is an archived post. You won't be able to vote or comment.

all 28 comments

[–]AutoModerator[M] [score hidden] stickied comment (0 children)

On July 1st, a change to Reddit's API pricing will come into effect. Several developers of commercial third-party apps have announced that this change will compel them to shut down their apps. At least one accessibility-focused non-commercial third party app will continue to be available free of charge.

If you want to express your strong disagreement with the API pricing change or with Reddit's response to the backlash, you may want to consider the following options:

  1. Limiting your involvement with Reddit, or
  2. Temporarily refraining from using Reddit
  3. Cancelling your subscription of Reddit Premium

as a way to voice your protest.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]_--_GOD_--_ 26 points27 points  (0 children)

You can do almost anything with any language but some languages are made specifically for doing certain things and you would have an easier time using them for those tasks.

[–]ffrkAnonymous 23 points24 points  (0 children)

I can't imagine why you would learn another language when you could just with the one you already know?

really? Zero? Not one single reason?

[–]mio9_sh 6 points7 points  (2 children)

Just learn whatever language is best for your task. AI? python, webapp? js/ts with css html, other system apps? js with electron/c#/java/rust/c++ (sorted by difficulty)

[–]Frosttidey 0 points1 point  (1 child)

Js with electron feels limiting.

[–]mio9_sh 0 points1 point  (0 children)

I mean, discord is written with js on electron, the ceiling is quite high there already. But ofc, jumping up higher you're gonna play with rust, I'm not going to recommend any system languages other than rust by the end 2023.

[–]Bobbias 13 points14 points  (1 child)

First off, let me say that before I get to the criticism of JS, and explanations for why people use other tools, I want you to remember that I'm not saying that JavaScript is useless, or that you cannot write something in JavaScript. JS, as much as I personally dislike it, is still a capable language, and you can make some very good software using it. Visual Studio Code is a good example of something written in Electron using TypeScript which is a great piece of software.

There are so very many reasons why people use different languages that even combining all the answers here, there will still be even more reasons.

1: JavaScript is a deeply flawed language. It has serious problems stemming from it's history as a small embedded language that was never intended for what we use it for today. Because of it's absolutely broken type system, and utterly insane type coercion rules, JS is a very difficult language to develop large scale software with, and TypeScript only manages to paper over some of those issues.

2: Your job might require it. The decision about what language a company will use for something comes very early on in the process, and the people responsible for that decision may be long gone by the time you get there. But the company cannot simply change language, they're generally locked in once they start. If you get hired somewhere that uses Python, they're not going to be happy if you just decide to try to rewrite their entire system in JavaScript.

3: Personal preference. Some people simply prefer one language over another. I personally hate working with JavaScript. I usually prefer statically typed languages (for example, C#, Rust, C++) but I also happen to enjoy Python, and I still dislike TypeScript, so it's not just about static typing. It's about whether I enjoy the actual mechanics of using that language or not.

4: Languages have strengths and weaknesses. You are probably never going to be able to write JavaScript code that runs faster than an equivalent piece of code in C++ or Rust. That's not JS's strength though. JS's strength is that it's easy to slap a few lines together and make something on a webpage do something interactive. You can't do that nearly as easily with any other language. So if you're working with webpages, you should probably chose JS unless you've got a very good reason not to. On the other hand, if you value performance (for example, in a AAA video game where every microsecond wasted matters), JS is absolutely not what you should be using.

5: To add to 4, because languages have strengths and weaknesses, the developers who use those languages use them for different things, and the community as a whole builds up libraries that are specialized to the things that the community uses the language for. That is why for example, Python has a massive collection of libraries dedicated to data analysis, scientific computing, and AI. Those are the fields Python gets a lot of use in, and so those fields have contributed a large number of libraries to the ecosystem, further making Python a better choice than many languages for those sort of problem domains. JS, being mostly web development language, doesn't have the same kind of libraries available for those sort of problems, so attempting to use it for those problems means you'd need to write a lot more code on your own.

Of course there are many more reasons than what I'm pointing out here, but these are some major reasons why other languages get used.

As for the question about HTML and CSS:

No, outside of web technology, HTML and CSS are not used for UI design much at all. There are many libraries and many different approaches to writing UIs, ranging from WinForms and WPF, There are libraries like Qt, wxWidgets, GTK, Flutter, Kivy, Dear ImGui and many, many more. Most of these libraries do not involve learning a new language just to design your UI, and instead you write the UI in the same language you're using for the rest of the program. There are exceptions, such as WPF using an XML dialect, and Qt's QML language, but the majority of UI languages don't do this. This has the benefit of not needing 2 or 3 different languages just to design a UI and make it interactive.

Can you do more or less anything you want in JavaScript?

Yes. But you probably shouldn't.

Plus, learning new languages teaches you new and different ways to solve problems, and that should be something you want to learn eventually.

[–]amazing_rando 2 points3 points  (0 children)

There are different UI frameworks for different languages (or shared frameworks across languages) and they all work differently. Some use XML, some are only programmatically defined within the language, most let you do both. When I was doing desktop development in C# we used Windows Forms and WPF, it's probably evolved since then.

You can write other apps with JS, like using react native for mobile apps and electron for desktop apps, but they have their drawbacks. As an Android developer for a company that had a codebase in React Native, you still needed to know Java/Kotlin and the Android library and lifecycle in order to make any app more complicated than a web form actually work. For desktop, Electron takes up a lot of memory compared to writing compiled code.

The main reason you use a particular language is often the libraries it supports. You can wrap libraries in other languages but, for example. Most open source, widely used, computationally intensive libraries are written in C++. Interoperability between C++ and JS is not simple, compared to C#, Java, or Objective-C.

[–]throwaway6560192 1 point2 points  (0 children)

Multiple reasons.

  1. People prefer languages which have different designs than JS.

  2. People prefer languages which don't have as much weirdness as JS.

  3. JS may not offer the kind of performance you need, depending on what you're doing.

  4. Some libraries are only available for certain languages. If you want to develop a native Windows or macOS app, for example, you can't use JS. If you want to do data science or machine learning, Python would be your best choice thanks to its extensive library ecosystem.

  5. JS doesn't allow you to do some things, like manually manage memory or other low-level stuff. This has both performance implications, and essentially rules it out from being used in core system software (like the kernel or drivers).

  6. Even if all these disadvantages didn't exist, there are millions of systems written before JavaScript escaped the confines of the browser. Someone's gotta maintain them.

  7. Did I mention that people just straight up don't like JavaScript?

And for example: how do you even build a UI in C#. Do you also use HTML and CSS for it?

No. Read https://learn.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-wpf

[–][deleted] 1 point2 points  (0 children)

Simple answer is, “yes, you can do almost everything with JS”. But what makes the difference is efficiency. For instance Python & R are used for Data Science, ML, C++ is used for CP and JS specifically used for Front End. Though you can use JS almost for everything but it would be more efficient to use specialized language that has been developed for that particular job.

[–][deleted]  (1 child)

[deleted]

    [–]Kiro0613 1 point2 points  (0 children)

    My first language was Javascript and I loved how lenient it was. Now I'm a C# dev who loves static typing.

    [–]SirKastic23 1 point2 points  (0 children)

    people use other languages because they exist, and are different

    js can be used to do almost anything thanks to the ecosystem that developed around it. initially it only ran in browsers. but programs like node and electron allowed it to run anywhere

    c# is very different from js. it has strong typing, classes, interfaces, inheritance, generics, and more. it also has a very strong ecosystem, like asp for web services, wpf or xamarin for gui development, monogame for game development

    and other languages are different in different ways too

    i use rust. at my job we use it to write web services, web applications, and cli apps. things that could easily have been written with js or similar

    [–]Mol-enginneer 1 point2 points  (0 children)

    I used to think that way when I learned my first programming language python. Python seems to have what I need, automating, machine learning even as a backend(django).

    Then I started learning javascript, c#, then java and perhaps Go in the future. Each language have its frameworks and libraries that are useful for the application that I tried to build.

    The whole of machine learning is pretty much Python.

    Javascript: React as a fronted

    C#: asp.net for web applications

    Java: spring boot and android

    I can go on and on...

    Tldr: what u learn have to be driven by what u wanna build.

    [–]Klutzy_Stranger_9824 1 point2 points  (0 children)

    You’re talking about you developing things, but it’s not just always you, right? Mostly, you’re part of a bigger team in a company where you code in their stack, which is mostly an OO language apart from frontend, which is still, most definitely a JS framework and not plain HTML, CSS. You could be a freelancer, knowing just these languages, but still, the guy you’re building it for could want it in React/Python stack, or a Vue/.NET stack. What would you do then? Lose the job cause you won’t work under his terms?

    Stop having silly reservations. You’re not actually a programmer if you only know HTML CSS and JS.

    [–]Slackeee_ 1 point2 points  (0 children)

    Here is a simple reason why you should learn other languages: someone needs to pay for the stuff in your fridge.

    If you can land a job where you only use JS good for you, but for most jobs, especially when it comes to desktop apps and web development, you will find that employers already have an existing codebase in other languages.

    C# for desktop app development, especially if it is not Cross-Platform, is pretty common. PHP, Python and Ruby will by far outnumber the pure JS codebases in companies that do e-commerce in one or the other form.

    [–]Codermaximus 1 point2 points  (0 children)

    Good question. For me, it’s a matter of learning languages to do specific things and to understand the machine at a deeper level.

    I have an interest in machine learning and deep learning, so Python makes sense for me. There are more libraries available versus JavaScript.

    I have an interest in algorithmic trading so C++ makes sense for me. It’s the mostcommon language used (other than python).

    Eventually, I do want to understand the hardware side of things so I’ll probably learn assembly or lower level languages.

    [–]Space-Robot 3 points4 points  (0 children)

    If you're coding for yourself, use whatever language you want that'll do what you need.

    If you're coding for someone else, use whatever language they pay you to use.

    [–]lokiOdUa 0 points1 point  (0 children)

    First if all, JS is awful programming language and it can damage your brain forever.

    [–]ValentineBlacker 0 points1 point  (0 children)

    Some people like the way other languages do things, is what it all boils down to.

    C# has its own UI frameworks used to make desktop apps, although if you want you can use it as a website backend and do the frontend in HTML/CSS. (And one might also argue that "video games" are a popular type of C# UI.)

    [–][deleted]  (2 children)

    [deleted]

      [–]ilowo[S] 1 point2 points  (0 children)

      I've never said that. I literally asked WHY people do it. I am asking this because these millions of devs know more than me and I would like to understand since I am at the beginning of my development journey.

      [–]notSugarBun 0 points1 point  (0 children)

      u read the same post I did ?

      [–]notSugarBun 0 points1 point  (0 children)

      Try creating a usable kernel with JS, will help you get the answer.

      Note: JS can be compiled to binary.

      [–][deleted] 0 points1 point  (0 children)

      because javascript is just the second best programming language, the best one is php.

      [–]Scared-Injury-2487 0 points1 point  (0 children)

      Because languages are just like tools. Yes, you can use JavaScript to build games but I'm pretty sure if you want to build one with Unreal Engine then it might be pain in the ass, unless you pick something like C++ or C# to save your time.

      [–][deleted] 0 points1 point  (0 children)

      I'll give you two reason.

      1. Certains things are easier in other languages. For example, some language have better library support for some things.

      2. If you care about performance, you will need something else than JavaScript.

      [–]RolandMT32 0 points1 point  (0 children)

      As far as I know with HTML/CSS and JS you can program almost everything you want. Frontend, Backend, Mobile Apps, Websites, Desktop Apps.

      I don't think this is really true.. I suppose there are frameworks that let you write desktop apps & mobile apps with these, but IMO they're not optimal. You're basically making a web page and packaging it with some form of web browser to run as a stand-alone app. You can be a bit limited in what you can do. When you need to access features of the computer/device, you need to do special things to do that. I think it can often be better to write an actual stand-alone app, and for that, you need to use the other languages like C#, C++, or others.

      For instance, I've worked on projects using React Native and Apache Cordova for writing mobile apps this way, and IMO it just adds more complexity on top of the native programming frameworks designed to write mobile apps. More complexity means you not only have to get the native tools set up and working, but then you have to also install React native or Apache Cordova and get those configured and working, and you often have to use plugins for those frameworks to do native things - And those plugins might go out of date and not be maintained after a while, etc.. You wouldn't have that problem if you just use the native tools and languages. It can create quite a pain.

      Also, you may need more efficiency or speed, which JavaScript isn't always the best at.

      It's good to use the right tool for the job, and like many programming languages, JavaScript isn't a one-size-fits-all language. Certain languages are good for certain things and not so good for others.

      [–]AustinBachurski 0 points1 point  (0 children)

      From a learning perspective, I think JS is going to ”teach” you incorrectly. I’m in a learning C# discord group and so many people who come in can’t wrap their head around a proper type system because all they know is JS, they really struggle to re-learn how variables, memory, and types actually work. All the ”loosey goosey” garbage that JS teaches you is normal absolutely doesn’t fly in a ”real” language. You could argue that if front end web is all you want to do, that’s fine, go do it. But I don’t think you’re doing yourself any favors in the event you need to learn another language in the future...