[flagged]
Bringing up Rust as an obvious alternative is not toxic.
- predictable
- incessant
- with belittling/reductionist/arrogant/elitist/combative phrasings
- handwaving rust shortcomings and tradeoffs
261–270 of 332 posts
Earlier quoted context omitted.
Not sure how I feel about Shakespeare and JK Rowling living in the same parenthesis! Computer languages are the opposite of natural languages - they are for formalising and limiting thought, the exact opposite of literature. These two things are not comparable. If natural language was so good for programs, we’d be using it - many many people have tried from literate programming onward.
I fully accept that formalism is an important factor in programming language design. But all HLLs (well, even ASM) are a compromise between machine speak ( https://youtu.be/CTjolEUj00g?si=79zMVRl0oMQo4Tby ) and human speak. My case is that the current fashion is to draw the line at an overly simple level, and that there are ways to wrap the formalism in more natural constructs that trigger the parts of the brain that…
x := 42
Or
let x = 42
Or
x = 42
It seems like a regression from modern languages.
Earlier quoted context omitted.
You can, but then you don't get any of what OOP actually offers. Message passing isn't the same thing as dynamic dispatch. OOP is a very different paradigm.
I think you are both unknowingly talking past each other: my understanding is that Smalltalk-style "object-oriented programming" ("everything is a message!") is quite distinct from C++/C#/Java/Rust "object-oriented programming" ("my structs have methods!")
Earlier quoted context omitted.
I never heard of hardware without one
Avoiding interacting with LLVM as a user doesn't mean you've created something equivalent to LLVM. And if the C compiler you use is clang then you're still literally making use of LLVM.
Earlier quoted context omitted.
It doesn't seem uncommon for someone to generally like Rust but still want to use something OO for UI. I'm in that boat. Never liked OOP much, but it makes sense sometimes.
What OO features are you thinking of that Rust doesn't have? Traits give you the ability to model typical GUI OO hierarchies, e.g.: trait Widget { fn layout(&mut self, constraints: Constraints); fn paint(&self, ctx: &mut PaintCtx); fn handle_event(&mut self, event: Event); } struct Button { ... } struct Label { ... } impl Widget for Button { ... } impl Widget for Label { ... } let mut widgets: Vec > = Vec::new(); Imp…
[flagged]
It is a genuinely strange social phenomenon. What is it about Rust specifically that attracts these people?
When does the migration to Rust start? /s
Earlier quoted context omitted.
Perlis's 10th epigram feels germane: > Get into a rut early: Do the same process the same way. Accumulate idioms. Standardize. The only difference(!) between Shakespeare and you was the size of his idiom list - not the size of his vocabulary.
Well sure - being in a rut is good. But the language is the medium in which you cast your idiom, right? Here's a Python rut: n = 20 # how many numbers to generate a, b = 0, 1 for _ in range(n): print(a, end=" ") a, b = b, a + b print() Here's that rut in Raku: (0,1,*+*...*)[^20] I am claiming that this is a nicer rut.
seq = [0,1]
while len(seq)
> I am claiming that (0,1,+...*)[^20] is a nicer rut.If it's so fantastic, then why on earth do you go out of your way to add extra lines and complexity to the Python?
Earlier quoted context omitted.
What OO features are you thinking of that Rust doesn't have? Traits give you the ability to model typical GUI OO hierarchies, e.g.: trait Widget { fn layout(&mut self, constraints: Constraints); fn paint(&self, ctx: &mut PaintCtx); fn handle_event(&mut self, event: Event); } struct Button { ... } struct Label { ... } impl Widget for Button { ... } impl Widget for Label { ... } let mut widgets: Vec > = Vec::new(); Imp…
You can do OO this way if you really want in Rust, kinda like how you can do it in C, but it gets cumbersome. Especially because there's no GC.
> Especially because there's no GC.
This is the only real issue I can think of. However, for implementing something like a UI, automatic GC isn't really necessary because the lifetime of widgets etc. maps very well to the lexical/RAII model. Windows own widgets, etc. Again, see all the UI toolkits implemented in Rust.
Earlier quoted context omitted.
Why not rust? It's popilar, in wide adoption, with wide support, without the baggage of C++. What'e the downside?
It is not backward compatible, the library system is immature, and there is no variety of different compilers for the language.
Hoo boy, wait until you hear about the state of C++'s library "system"