You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to model the styling language and input data in code, and generate schemas from there, so they are tightly-coupled.
Because of that tight-coupling, I wanted a language that had a good typing system.
This is the opposite approach to CSL 1.0, where schemas were developed completely independently of code, so that updating the language is also quite difficult.
I first tried this with typescript, but ran into various problems.
schemas didn't consistently match code
weak or non-existent support for deserialization (so need to write custom code for this)
The two together would mean having to write and maintain a lot of custom code, which I am not willing to do.
Also, JS is just kind of a mess in general from my POV.
Rust, OTOH:
Has mainstream appeal and uptake, and libraries written with it can be used in diverse contexts.
I like cargo.
I like its iterator support, which supports more functional patterns that I tend to prefer.
Serde is just awesome, and gives me easy serialization, deserialization, and validation of the models, with support for different formats (here just JSON and YAML, but there are other options). I don't have to write and maintain any custom code to handle this. While I don't understand the details, my understanding is there are features in Rust that make this possible, that many other language simply don't have.
very fast with single binaries
easy to integrate in other language environments
the borrow checker is quite a learning curve, but there's confidence that comes in making it happy; usually, if it compiles, it works
I also wanted to see if in learning Rust, I could help figure out citeproc-rs; perhaps adapting pieces of it (sadly am not sure this is the case)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to model the styling language and input data in code, and generate schemas from there, so they are tightly-coupled.
Because of that tight-coupling, I wanted a language that had a good typing system.
This is the opposite approach to CSL 1.0, where schemas were developed completely independently of code, so that updating the language is also quite difficult.
I first tried this with typescript, but ran into various problems.
The two together would mean having to write and maintain a lot of custom code, which I am not willing to do.
Also, JS is just kind of a mess in general from my POV.
Rust, OTOH:
Serdeis just awesome, and gives me easy serialization, deserialization, and validation of the models, with support for different formats (here just JSON and YAML, but there are other options). I don't have to write and maintain any custom code to handle this. While I don't understand the details, my understanding is there are features in Rust that make this possible, that many other language simply don't have.Beta Was this translation helpful? Give feedback.
All reactions