On Fri, Aug 31, 2018 at 4:04 AM, David Mertz <me...@gnosis.cx> wrote:

> On Thu, Aug 30, 2018 at 9:41 PM Guido van Rossum <gu...@python.org> wrote:
>
>> On Fri, Aug 31, 2018 at 3:19 AM, Michael Selik <m...@selik.org> wrote:
>>
>>> On Thu, Aug 30, 2018 at 5:31 PM James Lu <jam...@gmail.com> wrote:
>>>
>>>> It would be nice if there was a DSL for describing neural networks
>>>> (Keras).
>>>>
>>>> model.add(Dense(units=64, activation='relu', input_dim=100))
>>>> model.add(Dense(units=10, activation='softmax'))
>>>>
>>>>
>>> Why not JSON or XML for cross-language compatibility?
>>>
>>
>> Presumably because those are even harder to read and write for humans.
>>
>
> Guido is absolutely right (as usual) that JSON or XML would be *vastly*
> harder to read than that very clean Python code.
>
> That said, if you wanted a "DSL", the perfect choice would be YAML.
>

Hm. YAML is indeed a great, readable alternative to JSON or XML. But the
term DSL implies (to me) more than just nested key-value pairs. (Though who
knows maybe that's all Keras needs, and then it's a poor argument for
having a DSL.)

Then again maybe I'm confusing DSL (which appears to be a Rubyism) with
"little language": http://wiki.c2.com/?LittleLanguage

-- 
--Guido van Rossum (python.org/~guido)
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to