2 ms·
I want something very similar. A language powerful enough to get almost everything done with very few and very well thought through escape hatches in form of DS
by pdamoc 7y ago
I want something very similar. A language powerful enough to get almost everything done with very few and very well thought through escape hatches in form of DSLs. For example, Elm has a mechanism for writing shaders:
vertexShader : Shader { position:Vec3, coord:Vec3 } { u | view:Mat4 } { vcoord:Vec2 }
vertexShader = [glsl|
attribute vec3 position;
attribute vec3 coord;
uniform mat4 view;
varying vec2 vcoord;
void main () {
gl_Position = view * vec4(position, 1.0);
vcoord = coord.xy;
}
|]
I can think of at least a few other DSLs that would be useful: some logic/query languages (SQL/Datalog/GraphQL) and maybe a highly mathematical visual language like gezira (vpri). It would also be very useful to be able to write things in a lower level language for performance optimization (where needed).