(We renamed S-Lang to Simphony because S-Lang already exists)
The feature I needed most while writing Simphony programs was pattern matching: A jet returns an sum value / optional value and the program needs to react. I was wondering, @sanket1729, what kind of syntax you had in mind.
The README says that Simphony is based on JavaScript. AFAIU, there is no pattern matching in JavaScript.
Types are important in Simplicity, so maybe match or if-let statements like in Rust would be helpful.
Example from SIGHASH_SINGLE:
let sha2_ctx = if let Some(nonce) = jet_output_nonce(index) {
jet_nonce_hash(sha2_ctx, nonce)
} else {
sha2_ctx
};
Simphony always seemed like Rust to me, but I am not familiar with JavaScript, so there might be a bias.
(We renamed S-Lang to Simphony because S-Lang already exists)
The feature I needed most while writing Simphony programs was pattern matching: A jet returns an sum value / optional value and the program needs to react. I was wondering, @sanket1729, what kind of syntax you had in mind.
The README says that Simphony is based on JavaScript. AFAIU, there is no pattern matching in JavaScript.
Types are important in Simplicity, so maybe
match
orif-let
statements like in Rust would be helpful.Example from SIGHASH_SINGLE:
Simphony always seemed like Rust to me, but I am not familiar with JavaScript, so there might be a bias.