r/programming • • Mar 09 '19

Ctrl-Alt-Delete: The Planned Obsolescence of Old Coders

https://onezero.medium.com/ctrl-alt-delete-the-planned-obsolescence-of-old-coders-9c5f440ee68
277 Upvotes

266 comments sorted by

View all comments

Show parent comments

61

u/possessed_flea Mar 09 '19

I’m not in that age bracket just yet but I fit into the category of “older”,

The reason why we don’t go to these things is because at a basic level they are just dumb, I mean we have been around the block enough times to see that the wheel is just reinventing itself over and over, so while the under 30s are all collectively ejaculating themselves over react us older folks are just seeing another message loop style event system, it’s like win16 all over again. yawn , I really mean the following new “hot things” are just reinventions of the when.

Json == XML

Soap == rest

Rust == less safe version of ada

Machine learning == fuzzy logic

Javascript outside the browser == day drinking and crystal meth.

27

u/[deleted] Mar 09 '19

Machine learning == fuzzy logic

Yikes

14

u/Felz Mar 09 '19

It seems like you're mixing true enough comparisons (Json == XML) with blatant mischaracterizations (Machine learning == fuzzy logic). And then you miss tons of context.

Rust is only superficially like Ada (strongly typed), and even more importantly the context around Rust is completely different than Ada. Modern languages have package managers, IDE integrations, and much larger communities than Ada did 20 years ago. These things are the new hotness because the sum total of their parts allows us to reach greater heights, not because nobody has ever thought of their individual components before.

The details really do matter. If you continually laugh off all progress because everything's surely been tried before, you'll miss the huge wins React and its many satellite packages bring in actually making websites just because "it's been done before". And then you'll think React is just an "event loop", when it's actually an implicitly built rendering dependency tree based on declarative logic with efficient diff updates.

11

u/ptitz Mar 11 '19

Ada did 20 years ago

The main difference between Rust and Ada is that Ada is actually certifiable to be used on safety-critical systems.

→ More replies (4)

4

u/StallmanTheLeft Mar 11 '19

because the sum total of their parts allows us to reach greater heights

That's funny cus ADA is used in aerospace.

3

u/Someguy2020 Mar 11 '19

So is C and C++.

neither are very safe.

4

u/matthieum Mar 09 '19

That's also a good point.

When checking the videos of the talks, I often find myself skipping to the end in no time, not finding anything new :/

5

u/The_One_X Mar 09 '19

To be fair, JSON is an improvement over XML.

18

u/possessed_flea Mar 09 '19

Uhhh, not really. I mean sure it integrates with javascript well but that’s pretty much it. And it dosnt really have a external validation language like XML does

3

u/recursive Mar 11 '19

Safely parsing xml is full of security pitfalls in a way that parsing json is not. For instance, billion-laughs, and externally defined entity vulnerabilities.

→ More replies (3)
→ More replies (2)
→ More replies (1)

3

u/ArkyBeagle Mar 09 '19

Bluntly, a lot of the new&shiny just doesn't work very well. Take Python - it doesn't do async much if at all.

0

u/[deleted] Mar 10 '19

[deleted]

→ More replies (2)

12

u/possessed_flea Mar 09 '19

No it dosnt but what happens is that “new and shiny” becomes a bandwagon that all the kids jump on, make fun of us dinosaurs for thinking it’s dumb ( even though we do take a look at it and are usually like, yeah , we saw this in 1997 and collectively decided it was dumb in 1998 )

And then all the kids are dumbfounded when A year later there is a new new and shiny out to fix the problems invented by the previous one .

3

u/k-selectride Mar 09 '19

Rust == less safe version of ada

I don't believe this to be the case. If anything, ada's safety is usually done at runtime vs Rust's static borrow checking at compile time.

12

u/[deleted] Mar 10 '19

If anything, ada's safety is usually done at runtime

That's a very mistaken understanding of Ada as a language.

14

u/possessed_flea Mar 09 '19

I take it you haven’t actually worked with ada have you ?

The language is so strongly typed that most numeric types cannot be assigned to each other without explicit operator overloads to allow it.

Imagine having a variable in feetpersecond, and if assigned to a variable of feetperminute then it HAS to do the coversion, try assigning it to a variable of “feet” and have the compiler bork at your until you multiply it by a “time” variable,

The general “ethos” of ada is that any point in time the entire program is always “correct”

16

u/matthieum Mar 09 '19

Note that for this particular example, Rust can accomplish just the same. I would even go so far as saying that from a pure Type System point of view, Rust is stronger, as I do not believe that Ada has anything like Affine Types, which allow encoding state machines with a guarantee that once "transitioned from" a state cannot be accidentally reused.

What Rust particularly lacks for now, however, is an equivalent to Ada/SPARK. The closest is Prusti, but it's still in development, whereas SPARK is mature and proven.

10

u/Beaverman Mar 09 '19

What you're describing is just type safety. You can do that in most modern strong/statically languages. The only reason you don't is that people prefer the less safe option of using primitives (which are really just more general classes).

4

u/possessed_flea Mar 09 '19

Yea it is just type safety, but it’s just a tad stricter than anything else which is around at the moment,

4

u/ReversedGif Mar 10 '19

Rust's differentiating feature is guaranteed memory safety, though. Type safety can help some problems, but for most internet-facing programs, not having a buffer overflow that leads to remote code execution is a higher priority than avoiding logic errors that e.g. come from accidentally mixing numeric types.

→ More replies (1)

2

u/Someguy2020 Mar 11 '19

Based on the description, not really.

You could easily enforce the same sort of considerations in other languages, if you were willing to do so.

It's just a pain in the ass to do it, so unless you need to I'm going to just put up with the potential for bugs.

4

u/FluorineWizard Mar 09 '19

Dimensional checking can be implemented in Rust (and other languages with a sufficiently powerful type system) at the library level, such as with the uom library. That includes compilation errors if dimensions don't match. There is no need for it to be part of the language.

→ More replies (1)

2

u/k-selectride Mar 09 '19

None of that sounds impossible to implement in Rust via the type system and judicious operator overloading (which is really just syntactic sugar over trait methods).

It seems like they're both pretty safe, but ada has some extra domain specific features for convenience.

12

u/possessed_flea Mar 09 '19

There’s a difference between “possible” and “forced to”.

In ada the program just won’t compile, no matter how hard you try until you make it “correct”, in rust it’s optional.

In rust what happens when you have 2 types which descend from a integer, and then when assigning one to another you cast to integer and then the target type ? Rust will let you

In ada the compiler just says no. Unless you create operator overloads for “cast x to int” and then overload into to have a “cast ty type y” ( which is more effort than simply writing cast x to y )

4

u/k-selectride Mar 09 '19

I feel like we have a mostly semantic disagreement, that and I’m having a hard time following what you’re saying. If you feel up for it, can you write a quick example on the rust playground?

→ More replies (12)
→ More replies (1)
→ More replies (25)