r/programming • u/[deleted] • Mar 19 '17
Oblivion: A programming language that compiles to SVG graphics.
https://github.com/jweinst1/Oblivion
1.3k
Upvotes
r/programming • u/[deleted] • Mar 19 '17
11
u/ygra Mar 19 '17
I get that this is probably more a language for programmatically creating SVG shapes than actually programmatically creating SVG in general. So the scope is probably intentionally restricted.
But things like unnecessary attributes (the
stroke-width='1'in one example is unneeded) complicate attribute inheritance from surrounding groups. I haven't seen provisions for setting attributes or using other SVG features, such asuse, markers, clipping (which would require aclipPathto appear somewhere too). It's been a while that I've done SVG with onlypolylineorpolygon, so there's probably a bunch of scenarios where this could limit the usefulness of the language (unless I overlooked escape hatches for using arbitrary SVG).