Adam/Eve DSEL - Re: De Bruijn Bind (alternate bind syntax) Interest?

On Tue, Sep 7, 2010 at 1:24 PM, Smith, Jacob N <jacob.n.smith@intel.com> wrote:
For an Adam/Eve DSEL in C++ we used this syntax:
sheet save_file = "save_file" == sheet { interface == section { var{"file_name"} == [](arg_map args){ return any(""); }, var{"file_type"} == "txt", (var{"password"} <= (var{"file_type"}, var{"password1"})) == [](arg_map args) { return args.get<string>("file_type") == "txt" ? any("") : args["password1"]; } // more constraints }, output == section { // more constraints }, invariant == section { // more constraints } };
Interesting. At Adobe we had a DSEL that looked something like (from memory): dialog(name = "Clipping Path") [ column(child_horizontal = align_fill) [ popup(name = "Path:", bind = &path, items = list [ item(name = "None", value = empty), item(name = "Path 1", value = 1), item(name = "Path 2", value = 2) ]), edit_number(name = "Flatness:", digits = 9, bind = &flatness) ], button(name = "OK", dephault = true, bind = &result) ]; Or something like that. Of course we didn't have C++0x at the time. Tony
participants (1)
-
Gottlob Frege