Tag Info

Hot answers tagged

9

What you seem to be describing is Lazy Evaluation. Computations to be performed when the result is needed, rather than when it appears in the source code. In Haskell, this is done by hiding these computations behind monadic abstractions. In C++, the abstractions are similar, but more explicit, and partially hidden behind overloaded operators and expression ...


6

This is called Lazy Evaluation. It is a quite common pattern. In fact, every time you use the && or || operator in a C-like language, the second operand will only be evaluated if it needs to. Likewise, in an if/then/else, only one of the branches is evaluated. Lazy Evaluation has some interesting properties: In the absence of side-effects, making ...


2

Yes, DSLs are often implemented using other languages. Tcl, ruby, groovy, and many others are very good for creating DSLs. A simple DSL can be developed in a matter of just a few hours or days in many cases. A lot depends on he "D" -- the domain. If you're writing a DSL for financial traders, you might write it in C to get high performance. If you're ...


1

Are there valid FTP/FTPS/SFTP/SCP URIs which will break this scheme? Yes. Any user that has a password containing "<" or "> is likely to cause problems. Are they at all likely? Absolutely, since you don't have any control over the passwords used by the users (presumably). What mini-DSL is less likely to be broken by valid URIs? None. Any un-escaped ...



Only top voted, non community-wiki answers of a minimum length are eligible