Re: [External] : Re: Templated String and template policies, why the current design is bad

2021-10-18 Thread Brian Goetz
Templates are an *implementation* mechanism; they're not an API building tool.  If you want stronger type checking, use the existing API construction features of the language -- such as exposing a method that takes a list of arguments of specific types, or takes a record; if the template

Re: Templated String and template policies, why the current design is bad

2021-10-18 Thread forax
- Original Message - > From: "Brian Goetz" > To: "Remi Forax" , "amber-spec-experts" > > Sent: Lundi 18 Octobre 2021 18:47:00 > Subject: Re: Templated String and template policies, why the current design > is bad > This seems a very strange argument to me. > > Templates are by their

Re: Templated String and template policies, why the current design is bad

2021-10-18 Thread Brian Goetz
This seems a very strange argument to me. Templates are by their nature dynamic -- a template has an unknown number of holes, and the holes are filled with arbitrary expressions.   People like templates because they're easy to use, and they're easy to use because they're flexible.  Consider

Templated String and template policies, why the current design is bad

2021-10-17 Thread Remi Forax
I've recently proposed another way to implement the templated string/template policies but i may not have made it clear why i think the current proposal [1] is bad. First, some vocabulary, a templated string is a string with some unnamed parameters that are filled with the result of