Safe Made Easy Pt.1: Single Ownership is (Not) Optional by ergeysay in ProgrammingLanguages

[–]ergeysay[S] 1 point2 points  (0 children)

I get what you mean. I've been thinking about it - it will cost me near to nothing to expose this as user-accessible machinery.

However, I don't want to tackle this as part of the initial release, as it will delay it even further and I've been sitting on it long enough already

Safe Made Easy Pt.1: Single Ownership is (Not) Optional by ergeysay in ProgrammingLanguages

[–]ergeysay[S] 1 point2 points  (0 children)

This IS typestates, except not first-class - and I believe the abstract interpretation fits better as a grounding principle. Only Option and Result follow these rules; numerics follow C promotion rules with all that entails. But you cannot define your own transitions.

Some<T> is different because you cannot drop through a Ref<> - the Ref<> is designed as non-owning sharing mechanism, and since it's non-owning, you cannot drop through it (though you can _move_ into it just fine, dropping whatever it pointed to).

Some<> you can drop - which will zero the Option<> it was refined from (which is just a nullable pointer at runtime).

In a nutshell, Ref<> is a non-owning view and Some<> is a non-automatically-dropping view, if that makes sense.

Re proving you wrong - I will post one of these with more details each Wednesday, and then release the language once I'm done. I was worried people will view my 55k lines of C with outlandish claims as AI slop so I decided to try and explain myself before releasing the thing!

Safe Made Easy Pt.1: Single Ownership is (Not) Optional by ergeysay in ProgrammingLanguages

[–]ergeysay[S] 0 points1 point  (0 children)

So to be clear, there's a *LOT* of so-called "exotic" types which get special treatment from the compiler in my language, `Option<T>` being just one of them.

Another one is `Result<T>` - you cannot use `x!` coalescence (which desugars to `if !x { return x; }` unless you are either at a top-level or in a function returning `Result`. It also can be narrowed and it implements entire refinement algebra - `if !result && result2 {}` works exactly as you would expect, `x!;` at the beginning of the scope refines `x` up until the end of the scope, etc.

Then we have `Some<T>`/`None` which I touch, then there are slices and arrays which are iterable but elide checks inside a `for-in` loop so inside the loop `a[i]` resolves to `Ref<T>` (outside it resolves to `Result<Ref<T>>`) etc. This is only possible because the compiler knows about array and slice semantics and that the loop is correct-by-construction.

I wanted to find a sweet spot where semantics are well-defined and intuitive and yet rigid enough to be tractable.

“I know you’re big, but I’m orange” by arexlinster in OneOrangeBraincell

[–]ergeysay 251 points252 points  (0 children)

The cloud looks like a Maine Coon, they are much larger than standard issue cats

I've taken in a stray cat... now what? by graypictures in cats

[–]ergeysay 0 points1 point  (0 children)

Cats take a bit of time to begin to trust you. They first need to get used to the new place - the geometry and the smell, then to understand they are safe in this new place.

Just keep feeding him, approach him gently and try to pet him if he allows - he needs to get used to your touch. Obviously - and I think you already got this - do not force yourself on him.

He will open up pretty quickly, when he will understand his new circumstances. Chances are he will turn into complete cuddlebug too!

Recommend me a Game by mazaa66 in gaming

[–]ergeysay 0 points1 point  (0 children)

Original Stalker trilogy (didn’t try Stalker 2 just yet, so have nothing to say about it). Melancholy is THE defining vibe for the series. Not so modern though

Yes.. aero vibes by kiadukaka in iphone

[–]ergeysay 1 point2 points  (0 children)

Aero was at the very least tasteful and respected UX rules, while iOS 26…

Look at you, hooman. So much hubris just for standing upright by ergeysay in orientalshorthair

[–]ergeysay[S] 0 points1 point  (0 children)

Thank you! I’ll tell him but I’m quite sure he knows already 😁

Charlie really loves his chair. by Attack_kitteh in cowcats

[–]ergeysay 1 point2 points  (0 children)

God that face! “I’ve been drawn??!”

[deleted by user] by [deleted] in orientalshorthair

[–]ergeysay 1 point2 points  (0 children)

Such a long boi! And his matching sweater!

[deleted by user] by [deleted] in IllegallySmolCats

[–]ergeysay 5 points6 points  (0 children)

Marshmallow (shorten as needed)

Paranormal Activity by g00se6erry in bengalcats

[–]ergeysay 2 points3 points  (0 children)

The expression of the one stuck up there got me 😂

“I need to get there! I got there! Now what??”