• 0 Posts
  • 15 Comments
Joined 3 months ago
cake
Cake day: April 2nd, 2024

help-circle



  • Chimpanzees are likely going to be extinct 2-3 decades from now. Bonobos will be extinct in 4-6 decades. Orangutans will go extinct within 10 to 20 years. Most animals closely related to humans (including most apes & monkeys) are projected to become extinct within a few decades. I do not want to be alive when gorillas go extinct

    This is mostly due to the meat trade (apes and monkeys are often killed for meat which is eaten by locals or traded), being affected by the wars in the Congo/Africa, being kidnapped & sold as exotic pets, and habitat loss from human resource harvesting/logging & development. Humans are effectively displacing, enslaving, slaughtering, and cannibalizing their distant cousins




  • I agree that the slow compile times are pretty bad (maybe even deal-breakingly for large projects). I think it’s kind of necessary for a language with as powerful of a syntax as Scala though, it’s pretty absurd how expressive you can get. Maybe if it didn’t target the JVM, it’d be able to achieve way faster compile times – I don’t really see a point of even targeting JVM other than for library access (not to say that that isn’t a huge benefit), especially when it has relatively poor compatibility with other JVM languages and it’s nearly impossible to use for Android (don’t try this at home).

    Even more so, I think that null handling isn’t nice – I wish it were more similar to Kotlin’s. One thing I’m really confused as to why Scala didn’t go all-in on is Either/Result like in Rust. Types like that exist, but Scala seems to mostly just encourages you to use exceptions for error propogation/handling rather than returning a Monad.

    A more minor grudge I have is just the high-level primitive types in general – it’s pretty annoying not being able to specify unsigned integers or certain byte-width types by default, but if it really is an issue than it can be worked around. Also things like mutable pointers/references – I don’t actually know if you can do those in Scala… I’ve had many situations where it’d be useful to have such a thing. But that’s mostly because I was probably using Scala for things it’s not as cut out to do.

    With the tuple arguments point, I get it but I haven’t found it much of an issue. I do wish it wasn’t that way and it consistently distinguished between a tuple and an argument list though, either that or make functions take arguments without tuples like in other functional languages or CLI languages (but that’d probably screw a lot of stuff up and make compile times even LONGER). I saw someone on r/ProgrammingLanguages a while back express how their language used commas/delimiters without any brackets to express an argument list.

    I think an actually “perfect” language to me would basically just be Rust but with a bunch of the features that Scala adds – of course the significant functional aspect that Scala has (and the clearly superior lambda syntax), but also the significantly more powerful traits and OOP/OOP-like polymorphism. Scala is the only language that I can say I don’t feel anxious liberally using inheritance in, in fact I use inheritance in it constantly and I enjoy it. Scala’s “enum”/variant inheritance pattern is like Rust enums, but on crack. Obviously, Rust would never get inheritance, but I’ve found myself in multiple situations where I’m thinking “damn, it’s annoying that I have to treat <X trait> and <Y trait> as almost completely serparate”. It would especially be nice in certain situations with const generic traits that are basically variants of each other.

    Plus, I’ve always personally liked function overloading and default arguments and variadics/variadic generics and stuff, but the Rust community generally seems to be against the former 2. I just really hate there being a hundred functions, all a sea of underscores and adjectives, that are basically the same thing but take different numbers of arguments or slightly different arguments.

    The custom operators are a double-edged sword, I love them and always use them, but at the same time it can be unclear as to what they do without digging into documentation. I guess Haskell has a similar problem though, but I don’t think Scala allows you to specify operator precedence like Haskell does and it just relies on the first character’s precedence. I would still want them though.

    How it goes now, though, is I use Scala 3 for project design/prototyping, scripting, and less performance-sensitive projects, and Rust for pretty much everything else (and anything involving graphics or web). Scala has good linear algebra tooling, but honestly I’ll usually use C++ or Python for that most of the time because they have better tooling (and possibly better performance). I would say R too, but matplotlib has completely replaced it for literally everything regarding math for me.




  • JS or really anything you’d make a web app in (I use Rust with something like Dioxus/Yew/Leptos/Tauri), C#/.NET (I use F# because OO-style languages are ugly and a hot mess, especially C# and Java), Java/JVM (I use Scala whenever I can and Kotlin otherwise), C++ with GTK or Qt. There are a lot of options but obviously anything that’s not C++ or web is gonna give you a lackluster experience (though I have a thing against web apps and will go through a lot of hoops to have my application use a native interface)


  • sparkle@lemm.eetoProgrammer Humor@lemmy.mlSwitching to OCaml bois
    link
    fedilink
    Cymraeg
    arrow-up
    1
    ·
    edit-2
    1 month ago

    I like polymorphism. Having to have a hundred differently named functions or structs or something that do the same thing but slightly differently in Rust is annoying as hell. Especially with all the underscores you have to type… If Rust were more functional though it’d make that problem go away pretty quickly.