tantalum
2018-06-16 11:12:17 UTC
i use scheme-like syntax to write c and javascript, and i do this with
two transpilers that ive recently revised.
you might have looked at sc and sescript in the past, but what ive
changed now is that i removed features that dont map directly to a
single c syntax form and straightened things out to really make the
output as if originally written in the target language (albeit
unformatted).
links:
* https://github.com/sph-mn/sph-sc
* https://github.com/sph-mn/sescript
sometimes i wondered if the number of round brackets is a bit much for
the imperative style of c and javascript and if a coffeescript-style
indent-based syntax would be better suited. but the simplicity,
structural editing and reading speed im used to with scheme make up for
it.
an interesting thing ive found is that i need about 50 test cases to
test ecmascript and its edge cases and 140 to test c - that says
something about the complexity of these languages.
two transpilers that ive recently revised.
you might have looked at sc and sescript in the past, but what ive
changed now is that i removed features that dont map directly to a
single c syntax form and straightened things out to really make the
output as if originally written in the target language (albeit
unformatted).
links:
* https://github.com/sph-mn/sph-sc
* https://github.com/sph-mn/sescript
sometimes i wondered if the number of round brackets is a bit much for
the imperative style of c and javascript and if a coffeescript-style
indent-based syntax would be better suited. but the simplicity,
structural editing and reading speed im used to with scheme make up for
it.
an interesting thing ive found is that i need about 50 test cases to
test ecmascript and its edge cases and 140 to test c - that says
something about the complexity of these languages.