do fans of the D language say "I want the D"???? 🤔
@grainloom TIL I'm a fan of the D language
@a_breakin_glass @grainloom
Honestly, everybody who uses go should just switch to D.
(I'm not 100% sure the same applies to rust. Maybe like 60-75%?)
@enkiv2 @grainloom I think rust kind of has an edge over D, perhaps
@a_breakin_glass @grainloom
It might. I haven't been able to glean specifics from rust fans about what makes rust worthwhile, other than "it's pointer safe" which is super common even in compiled languages these days.
@enkiv2 @a_breakin_glass linear/affine/whatever typing is not at all common, I know about maybe 3 practical languages that have it and only one is used widely: Rust
plus, it has no runtime, has traits instead of classic OOP, has a powerful type system, has iterators, so you can write functional style code.... and that's just what it already had at 1.0
it also has generators now (not sure if it's in stable)
oh, and a nice package manager
@grainloom @enkiv2 @a_breakin_glass I'd summarize some of those points by saying Rust takes the best lessons from the last several decades of programming language research on how to help programmers write modular reusable software. Many of those lessons are not complicated (sum types and generics are so incredibly useful and mostly very simple ideas) but the careful design to incorporate them all into a single language is important.
@jamey @grainloom @enkiv2 @a_breakin_glass me, I've always thought the best way to make reusable software was to write up your algorithms in pseudocode so anyone can use them
@kara @jamey @grainloom @a_breakin_glass
Pseudocode is just a poorly-defined language that nobody really knows how to unambiguously interpret. I prefer to avoid it whenever possible.
@kara @enkiv2 @jamey @grainloom Functional Fortran when :^)
@a_breakin_glass @enkiv2 @jamey @grainloom well, worked for "Numerical Methods"!
my point, put across in a semi-joking manner, is that "reusability" as currently defined is a suspect ideal, at best
reusability should be achieved by coming up with universal abstractions that can exist _apart_ from code
reusing the code itself is merely an expression of that universal sin of computer geeks, valuing mere convenience
@grainloom @jamey @enkiv2 @a_breakin_glass the end result of chasing that dubious prize is what we see today
shit like node.js and Electron
write once, run anywhere! *bitter laugh*
@grainloom @kara @jamey @enkiv2 @a_breakin_glass c really works best when all you have to consider is one compiler & os & hw combination
i really wanna meet the person who set the rumour into the world that c is a portable asembler language
@jamey @grainloom @kara @enkiv2 @a_breakin_glass i've earned a lot of money (wasted a lot of life) compiling software for solaris (and it's cc, by which i mean: porting it over… it was no fun…)
@a_breakin_glass @meena @jamey @kara @grainloom Was it related to GNU extensions?
@enkiv2 @a_breakin_glass @meena @kara @grainloom In the case of libXCB at least, I recall the biggest Solaris patches being to the autotools build system: entirely different compiler flags between GCC and the Solaris cc, unsurprisingly. But there were also some minor quibbles about the type of the pointer in a struct iovec, and maybe about the return type of malloc? I don't remember any more. We didn't use any GCC extensions IIRC.
@meena @grainloom @kara @enkiv2 @a_breakin_glass haha, yeah, fortunately I only had to accept patches from somebody working for Sun, so I didn't have to figure out the details myself 😅
@a_breakin_glass @meena @jamey @kara @grainloom Well, that's the point of posix, isn't it? Posix is a standard for making sure you can write portable c code and still access the filesystem and crap.
@enkiv2 @a_breakin_glass @jamey @kara @grainloom that's theoretically true
but posix itself is at odds with the c standards, so sometimes you might have a better way of expressing something in C99 or C11 or whatever you chose and it's behaving differently, or doesn't exist to begin with
for one, for the other: c's undefined behaviour makes it really really hard to reason about code
and most c programmers don't even know what's really undefined
because c isn't really a language
it's a myth, an urban legend.
it's impossible to grasp.
and a lot of that is c devs' own fault, as i wrote over here: https://mastodon.social/@hirojin/18117298
@meena @grainloom @kara @enkiv2 @a_breakin_glass I mean I've written significant C that works on at least three compilers, most POSIX-conforming OSes, both obvious endiannesses (though not middle-endian), and at least 32-bit and 64-bit pointer/long sizes, and all of that wasn't too hard; just small patches here and there for Solaris and Hurd and BSD. But then we encountered Windows and everything broke 😫