He/Him | Hu/En/some Jp | ASD | Bi | C/C++/D/C#/Java

  • 5 Posts
  • 72 Comments
Joined 7 months ago
cake
Cake day: March 16th, 2024

help-circle


  • It’s time to return to the roots, the times when you used goto instead of function calls! Fortran and COBOL all the way! /s

    Once you look beyond the “git gud” and “we must gatekeep programming from the normies” aspects of coding, you might want a language that is either way more productive than C (D), a language that offers memory safety and functional programming paradigms (Rust), or even a language that has relatively good portability even at the cost of performance (Javascript).

    If you’re only grumpy about Electron apps, then be mad at the corporations that:

    • forced colleges and universities to teach Javascript and nothing else to students, so now we have programmers afraid of type declarations,
    • jumped on the “Big Data” and “software as a service” train, so every app needed to be a “website”, because “it’s so convenient, pops no longer need to install wordprocessor dot exe, just type wordprocessor dot com into a browser”.



  • I would add to the downside that it’s not the best programming language for game development, etc. There was some blog post about how troublesome is it to develop games using Rust due to some of the features that are good in other areas, like the whole concept of “immutable by default”.

    I can also recommend D, if you want to deal with different issues, like the D Language Foundation fearing of change due to not wanting to deal with division from a new and incompatible version yet again, the GC being both a blessing and curse, if you want to go without a (tracing) GC you’ll need to go with a custom runtime that potentially missing many of its features, the attribute hell, etc.











  • XML has its strengths as a markdown format. My own formatted text format ETML is based on XML, as I could recycle old HTML conventions (still has stylesheet as an option), and I can store multiple text blocks in an XML file. It’s not something my main choice of human readable format SDL excels at, which itself has its own issues (I’m writing my own extensions/refinements for it by the name XDL, with hexadecimal numbers, ISO dates, etc.).





  • I have talked to people about Rust gamedev (including those who left Rust for D due to gamedev), and it’s not a very good one, due to the functional aspects. Outsiders often joke about how Rust has more game engines than games.

    Zig has the header file problem. Header files were originally created to get around memory limitations of old workstations, that no longer exist. They also complicate coding, since you now often have to implement things at two places at once. However, Zig not only copied C++'s multi-inheritance, but also its header files, without understanding the actual reason why it existed in the first place.


  • Classes can be useful for abstraction. Just because they often overused doesn’t mean they’re bad.

    Without an explicit class, I would either:

    • had to reimplement them in a language without them (which looks extremely ugly and can be unsafe),
    • create an “omnistruct” that keeps track of all posssible field (only looks a bit ugly),
    • use uglier virtual functions for cases when I would need local states (doStuff(cast(void*)&localstate, values) vs localstate.doStuff(values)).

    While structured programming was a godsend to the chaos preceding it, newer programming paradigms should have been instead seen as tools rather than the next dogma. OOP got its bad name from languages that disallowed its users to develop without classes, and enterprise settings making its devs to implement things that could have been simple functions as classes, sometimes complete with factories.

    Same is with functional programming. There’s clearly a usecase for it, but isn’t a Swiss-army knife solution for all problems of programming.