3 ms·
Let me help your imagination: the users of your language ask you to help them get auto completion when they write code in this language. How much more complica
by valenterry 5y ago
Let me help your imagination: the users of your language ask you to help them get auto completion when they write code in this language.
How much more complicated would that make things based on the two choices?
And, just for completeness, here's an example that turns things around: your users are asking you to change the syntax und use lisp-like evaluation/expressions. So (* 3 (+ 1 2)) instead of 3 * (1 + 2). Or, they ask you to do it the other way around.
How much more complicated would that make things based on the two choices?
- pjc50 5y agoAt this point rather a lot more weight is being put on the DSL than a mere minilanguage, so I'd embed a language interpreter for something existing. I've used Tcl for this in the past. But when you say "users", that indicates a different use case anyway. The minilanguage is basically source compression or code generation, it's for the developers. > your users are asking you to change the syntax und use lisp-like evaluation/expressions Nobody ever wants that except Lisp users, and if you're surrounded by angry lisp users you should just give them what they want and embed a lisp. Or even just write one, Scheme is small enough. But as far as I can tell, "free monads" are a lot of machinery to re-implement imperative stateful programming when you could have just used a language that wasn't Haskell in the first place.
- valenterry 5y ago> At this point rather a lot more weight is being put on the DSL than a mere minilanguage, so I'd embed a language interpreter for something existing. Sure, but then why not just use the (host) programming language directly? > But when you say "users", that indicates a different use case anyway. The minilanguage is basically source compression or code generation, it's for the developers. I meant developers as well - they are still users of your language no? :) > Nobody ever wants that except Lisp users If you are just going to disregard all use-cases and examples I give, then of course in the end we will end up with a solution-space where all my arguments don't apply. You said you can't imagine such a situation, I gave you an example. I can't really do more than that. > But as far as I can tell, "free monads" are a lot of machinery to re-implement imperative stateful programming Not at all. And free monads are completely orthogonal to Haskell and very useful in non-pure-functional programming languages as well. I think this conversation is not very fruitful without a basic understanding of what they are.