Ask coding questions

← Back to all posts
What language?
mkhoi (318)

If you have to stick with 1 programming language forever for everything that you write... What would it be?

Ps: also remember about what language your career needs, your personal favorites... too

And apparently Python and JS are the most popular choices


Assembly. Because I like wasting my time.

eankeen (2054)

Clear choice of JavaScript for me! Use it all the time and I absolutely love it!

ItsEmpCs (39)

True. It's easy and lets you make website and also no problems making [email protected]

Ntechh (9)

C++. It's the fastest and most portable language. Ever.

liltaco (207)

@Ntechh some things like sockets and libraries are difficult in C++, and they are big compromises because of the language's age. Also the syntax, even in C++17, is mostly dated. There are alternatives popping right now like Rust that have similar performance and all that fixed. I'd recommend you to just check it out, just to know it is there. I don't use it but its ideas are interesting.

Ntechh (9)

@liltaco I've never heard of Rust, but it looks promising. However, I've been trained in C++ and it'll be a while before its unmatched compiler optimization, low-level access, and raw memory management are rivaled by a competitor.

As to libraries, they're just a question of how well each was built, and compatibility. There are great socket libraries such as Dermesser's Libsocket on Github. With that library, implementing a http client, for example is as simple as:

# include <iostream>
# include <string>
# include "../headers/inetclientstream.hpp"
# include "../headers/exception.hpp"

// HTTP client demonstrating the use of snd and rcv on STREAM sockets

int main(void)
    using std::string;

    string host = "";
    string port = "80";
    ssize_t len;
    string test;

    char* buf = new char[10000];

    try {
	libsocket::inet_stream sock(host.c_str(),port.c_str(),LIBSOCKET_IPv4);

	sock.snd("GET / HTTP/1.0\n\n",16);


	while ( 0 != (len=sock.rcv(buf,10000)) )
	    std::cout << string(buf,len); // write only as many characters as we read
    } catch (const libsocket::socket_exception& exc)
	std::cerr << exc.mesg;

    return 0;
liltaco (207)

@Ntechh Rust has a very different fundamental idea to C++. It erased the idea of pointers and memory management and race conditions with its "ownership" model, so it negates the largest problem in C++, memory leakage. Low level access is similar, and I am not saying that Rust is the future, but there's no reason C++ will stay for many years because of its flaws. The problem with C++ libraries is that many of them are dated and while not all are, it's a problem. Also, C++ tooling is subpar, with no well known package manager and single way to use it.

jpayne (5)

C, so I can recreate any language I want

mkhoi (318)

@jpayne That is an AWESOME IDEA! But kinda fell like cheating tho

KevinLacker (4)

JavaScript. With Node and React Native, you can build mobile apps and server-side stuff along with typical web frontend things. So even though I'd be stuck with one language I could still build all sorts of things

Zavexeon (1159)

Well, that's a tough choice

I'd probably go with Ruby.

a5rocks (821)

Python has all the features I need (thus far).

And this might be cheating, but Cython allows you to use C in Python too (if i remember correctly).

mkhoi (318)

@Game_Collabs Are there any more python-something hybrid because Cython and Jython seems cool 😎

a5rocks (821)

@Game_Collabs Oh yeah, and how could I forget Rust + Python interoperability.

Game_Collabs (15)

@mkhoi I don't know. Will keep an eye out for more!

Pythonier (315)

Nice question, although python is really good, I'd probably go with javascript.

ebest (664)

@Pythonier Your username is an oxymoron with this reply.

Pythonier (315)

@ebest True, python is my favorite language but I am pretty sure you can do more with javascript in the long run.

ebest (664)

@Pythonier Wellllllllll, what does your post say?


Pythonier (315)

@ebest First of all, that is not my post, and the one I did post was based of the comments not me.

AquaMarine0421 (33)


OathOfCode (27)

PYTHON is litteraly the greatest language ever!
You can create a website, login system, and games too!
Its very easy to learn as well!

PYer (3850)

Depends, can you use flask with python? It kind of uses html

skull_is_dull (42)

python, because you can make a lot of useful things

GillesDevillers (2)

C, because it’s simple (a lot more than those weird C++ syntaxes), powerful and fast!

Game_Collabs (15)

I'd stick with python.

Hacker22 (18)

JavaScript for SURE. With Node.js and an ejs (pretty sure thats still JS) template you can basically have JavaScript and HTML with a full server. And if you ever need more functionality that JS can't provide, just call an API, super easy!

SPQR (588)

C++ because of its sheer speed

Murzikal (22)

i only know python lol, so python i guess

mkhoi (318)

@Murzikal You cant write <insert language here> if you dont know <that language> 😁😁😁

IndyRishi (150)

Maybe GAB or yaYUL or yaGAB

IndyRishi (150)

maybe YUL would be impossible to find
all traces of YUL are gone

IndyRishi (150)

YUL! My favorite language is YUL. I can finally go to the moon!

MeowcaTheoRange (7)

HTML, then you can run any language under a VM >:)

Crissier (1)

C++ just because

Squrril (3)

Python 3, because it is simple, understandable, and beautiful. Unlike Java and C. No-wait! My favorite programming language is HTML. Definitely.

gladimdim (1)

Dart. because it compiles to native code on iOS and Android



Dopest_Pleb (18)

JavaScript, it's been a long 9 years.

kaldisberzins (344)

I love javascript and it is the language that I primarily code in but it would be severely limited by not being able to code in HTML or CSS. While it would be not impossible to code websites and would still be mostly possible to do some back end work, Javascript is still dependent on the other two for many things. Other languages, like the hybrid ejs or jsx for React would not be allowed as they are really blends of HTML and jasvascript. This limits it immensely. This is why I would probably switch to something like C or C++ because they are much more standalone than javascript.

JSer (84)

@kaldisberzins but HTML and CSS are not programming languages

eankeen (2054)

@kaldisberzins Using jsx is completely valid from my point of view! :P Have you thought about manually using those render functions minus the jsx? :wink:

Nanowrimoijk (59)

id go with JavaScript