Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
bioDan56227y@Marethyun because they're 13 and they know jack shit about computers (if they say that)
-
Trojaner8107y@nik123 not all FOSS software is automatically better than paid proprietary software..
-
@nik123 I wouldn't count on it. C# was developed by Microsoft for Microsoft and all their fan boys. I'd say learn another language, there's a lot out there
-
elazar10307y@Lasagna I want to write a small library that will work on every single architecture on earth. Performantly. What language should I choose?
-
@nik123 you cant use C# without Windows. C# is for Windows, just like Swift for Apple products.
-
I don't get why people hate C. The language is mature and well documented. I usually hate higher level languages that change all the time.
-
@afrometal you can use Mono on Linux, works really well. The control software for my 3d printer it's C# and runs perfectly fine on Linux.
-
Learning C after being a JS guy for a long time has been good for me, I think learning more methodologies sharpens our skills as programmers.
-
@afrometal Weird. I guess my Linux-servers and MacBook are secretly running Windows 🤔
-
@Marethyun Because programming students are exposed to constant abuse from comersial academies, courses and books commercially created to convert as many long people into brainless monkey coders and fulfil the primitive coding needs
-
elazar10307y@Lasagna well, C was designed to be relatively straightforward to implement, so the ubiquity of compilers is really a language feature.
It is also a small language; the only other small languages I can think of are lisp-style or academic.
The only widely-used language that was designed to compete with C is GO, and it's not really a competition since it's hardly a systems language.
So, when someone says "C sucks" the question is "relative to what?". It's less expressive than, say, English; it's more prone to errors than Gallina - but both aren't meaningful comparisons, right?
Take a C-based project, such as Linux, Chrome, etc. and tell me what language should it be written in. The candidates - C++, Rust, Go and friends - all have severe issues on their own right.
Maybe WebAssembly will replace C one day. Maybe. -
@Lasagna interestingly many studies have shown there are no productivity gains from using C++ over C.
-
elazar10307y@Lasagna the first is not something I claimed.
The second is true - possibly with the exception of parsing. Please name an easier commonly-used language (managed/GCed languages are off the table by definition). -
elazar10307y@Lasagna I meant "C is relatively small for a mainstream language, and languages that are _much, much smaller_ are generally LISP-like or academic. Lisp does not compete with C since it is not a systems language.
I don't think that the size of the adddition required for turing completeness is important. Nor is undecidability IMO: type-checking Java or Scala is undecidable, but that doesn't seem to be a problem in practice.
I read somewhere that writing a recursive-descent parser for C is easy, and the problem is with yacc/bison-like tools. I don't know if this is actually the case. But anyway, porting a compiler implementation to a new environment is basically porting the code generation, and this is the "mainly straightforward" part (no closures, no complex multithreading, etc.) -
Also a C developer here. And C is not useless depending on the use case. Not all companies favor portability over the speed that C can provide. And if we're talking about code portability, we're really only talking about ANSI C and GNU C
-
I use C and C++... I really like both languages and these r the only 2 languages I like... so much that I probably won’t code at all if not in these languages... or maybe something else low level ( no not assembly please 😨 )
I just find C and C++ so much fun 😍😍🤗🤗 -
elazar10307y@watzon possibly. It's certainly the only candidate I can think of. So we compare a recently-invented, complex, with a relatively simple 40-years old language.
Linear logic (the theoretical basis of Rust's type system) was only discovered ~15 years after C was invented. And it is not completely understood to date. Rust uses some ad-hoc solutions that work in many cases, but not all. And when they break, the error messages are not easy to understand.
I admit I am yet to use it successfully in a toy project - though I have written reasonable C programs (small games) a month after I began learning it, some 16 years ago. Oh, and programming languages are my profession and hobby. I can only guess that if you like Rust, you're probably a programming-language enthusiast and not the average programmer.
Additionally, Rust is very far from being straightforward to implement, so its portability is basically the portability of its reference implementation - not competing with C AFAIK. -
watzon45877y@elazar I can appreciate a well thought out response. I agree that rust isn't all there yet, but I've loved it so far. It's loads better than C/C++ when it comes to package management, helpful errors, and (in my opinion) syntax. I'll agree that it's not ready to replace C++ yet
-
elazar10307y@watzon better errors than C++, sure (maybe concepts in C++20 will help). But I think the error messages in C are pretty good.
Note that the errors themselves are an implementation issue, but the language should lend itself to it
C++ does not - but (AFAIK) neither does the static-analysis-dependent parts of rust. I'm sure you know better than me about this anyway. -
elazar10307yBTW there is a new, real alternative to C: WebAssembly.
It will take some time to happen though. -
@elazar The most important feature besides convenience of languages like Rust and Go over C is safe/unsafe mode, imo.
In C it's a lot easier to create mem leaks (possibly resulting in security breaches) for example. -
elazar10307y@theCalcaholic this is well known and agreed. But for the security of the languages mentioned you pay the price of rigid type system.
Personally I'm ok with that, as long as the abstractions suits me. There weren't any at the time C was invented (see the failure of Pascal), and they aren't perfect yet. -
@elazar Was Pascal a failure? I've never worked with it and I'm too young to judge - but wasn't it quite popular at the time
-
elazar10307y@theCalcaholic it was popular, then failed - didn't scale well and was never a fit for systems programming.
-
elazar10307yAnd part of the reason is ridigity of the type system (ehm strings), inappropriate data structures ( strange sets) and lack of modularity.
-
Trojaner8107y@Bitwise since .NET Core exists, C# and .NET are officially supported on Linux by Microsoft. .NET Core runs natively on Linux without missing features.
Related Rants
When people say that C is no longer used.
rant
c