13
AdamOnAir
10d

A word on languages.
I really like C, did it since I'm 11 at school with some Pascal. Simple language, 32 reserved words (unlike COBOL ahem) and never wanted to change, just discover some new languages, never replace it.
I saw Rust in 2020, and it catched some of my time, like a year. It's not bad, but you feel strangled with rust. In C, I can walk on water, and my programs run in under a second with less than 100mb.

The syntax [Rust] is also hard and ugly.
So C won over Rust.

Then Go, in 2022. Better syntax than Rust, prettier code and it had a garbage collector ! Works easy. But still, C was better. Faster programs, I can do whatever I want.

Then I discovered Zig in 2023. It was cool bc I could cross-compile C and C++ alongside Zig. The Syntax (yeah third time I repeat it) was annoying. Like Rust. But I like the fact there is no memory-safe aspect in the language design.

So even now, I use C and sometimes Assembly (doing a bootloader for my [breadboard computer](https://github.com/3dgoose/65b02), I know there's no MarkDown in DevRant) for some lowlevel projects and god does it go fast : 50kO max for assembly and 10mb for C, with some amazing compile time ! In fact I did a program to estimate Pi with Montecarlo method in Rust and Python and it got 20 minutes for 10^10000000000000000000000000000000000 while C and Assembly got 70 second (I swear at this point).

The world now is preferring memory safe languages like Rust but if you know how to manage memory in C, why use Rust ?

Sorry for bad english, bye
I hate C++

Comments
  • 6
    Because if you're doing anything nontrivial or with a team, you're eventually going to run into a memory issue if you don't have that safety.
  • 3
    @spongessuck what an utterly bullshit. Linux anyone? Huh?
  • 5
    Analogous question:
    If we know how arithmetics works, why don‘t we do calculations with pen and paper? Why do we use electronic calculators?

    The reasons are:
    It‘s more convenient
    It’s faster
    It’s much more reliable

    Same goes for memory safety. Even if we know how to do it manually, why the fuck would we want to if we have languages and compilers doing it much much better?

    I honestly don‘t get why so many devs seemingly struggle to understand this.
  • 1
    Also I don't know much about rust but I do know if it was as slow as Python, nobody would use it.
  • 1
    If you know how to manage memory in C *and you never make mistakes*, why use Rust?
  • 1
    @spongessuck write me safe code
  • 2
  • 0
    @Lensflare rust is slower rust is heavier rust is strangling me
  • 0
    @donkulator that's my point but I wanted to discover new things
  • 0
    @spongessuck rust is faster. Python is a special case
  • 1
    @AdamOnAir Try Swift. It’s as elegant and simple as a script language and as performant and secure as Rust.
  • 1
    How far can you go in AI with C?
  • 1
    Rust is just as fast as C and because you can easily reuse high quality data structures it's often faster in practice

    It's also just better in every way imo. Better syntax, better type system, more ergonomic features, support for async, etc. etc.

    And all that at the same runtime speed and memory safe by design

    But you do you I guess, some people just love C 🤷‍♂️
  • 1
    @Lensflare yea beautiful I just played with it back in 2017 I think, not much but it was good
  • 1
  • 1
    C gives you speed, control, and simplicity, while Rust prioritizes safety with stricter rules. If you value freedom and performance, C wins—and for you, it clearly does.
  • 1
    I think it is about money, not performance. Low level code optimization takes time and someone has to pay it. You could replicate Mario game to run on old slow machine and spend few months with it. But since no one is using them, you can make same game over weekend running in browser and game experience will be almost identical.

    Also, security bugs/exploits are very expensive for corporations.
Add Comment