[Python-ideas] Should Python have user-defined constants?

Stéfane Fermigier sf at fermigier.com
Tue Nov 21 13:04:17 EST 2017


On Tue, Nov 21, 2017 at 6:34 PM, Chris Barker <chris.barker at noaa.gov> wrote:

>
> And what's the use-case, really? beyond the use case for all sorts of
> static typing...
>

Javascript is dynamically typed, and has 'const' variable declaration which
were added in ES6.

Static typing is not the only use case. Discouraging reuse of variables of
favouring functional style over imperative is a strong use case for 'const'
in JS.

But I agree that the scoping rules are different in Javascript, and this
argument is much less convincing in Python.

  S.

-- 
Stefane Fermigier - http://fermigier.com/ - http://twitter.com/sfermigier -
http://linkedin.com/in/sfermigier
Founder & CEO, Abilian - Enterprise Social Software -
http://www.abilian.com/
Chairman, Free&OSS Group / Systematic Cluster -
http://www.gt-logiciel-libre.org/
Co-Chairman, National Council for Free & Open Source Software (CNLL) -
http://cnll.fr/
Founder & Organiser, PyData Paris - http://pydata.fr/
---
“You never change things by fighting the existing reality. To change
something, build a new model that makes the existing model obsolete.” — R.
Buckminster Fuller
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171121/8c25dd89/attachment.html>


More information about the Python-ideas mailing list