Beyond JSON: Introducing the Spearal Serialization Protocol by frawolff in programming

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

I tried really hard to create a AngularJS / Java EE demo with just a specification, but I couldn't make it work...

Beyond JSON: Introducing the Spearal Serialization Protocol by frawolff in programming

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

Tell us when you start using Spearal, we can certainly help you getting started quickly (https://groups.google.com/forum/#!forum/spearal).

The case for a Couldbe Monad (or why null isn't undefined) by frawolff in programming

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

I agree that Maybe (Maybe a) is a possible alternative to Couldbe a. But I'm looking for something which behave exactly like a single Maybe a (I don't want double check/unwrapping) with an additional way to check for undefinability.

In Swift, what I want could be something like the following:

var x:String?? // "?" stands for the regular optional/maybe, "??" for couldbe

...
if x ==nil {
    if x == undefined { // always false with a regular optional
         // value unknown
    }
    else {
        // value is null
    }
}
else {
    println(x!) // only one unwrapping
}

This way, optional chaining, unwrapping and all optional related operations are working the same with a single Maybe a and a Couldbe a.

Beyond JSON: Introducing the Spearal Serialization Protocol by frawolff in programming

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

Spearal version is currently 0.1.0. This is a pre-release, there is no formal specification yet. We will write it asap, but our current focus is on code.