Hello,

On Thu, 9 Jul 2020 01:22:48 +1000
Steven D'Aprano <st...@pearwood.info> wrote:

> Whenever someone says "Python is the only language..." it really

Yeah, the original message in this sub-thread was
https://mail.python.org/archives/list/python-dev@python.org/message/YPP2TWYONFL4BOR3MJHGTHWSPMQNP7J7/
 ,
and started with:

-----
With the advent of Lua 5.4, Python appears to be the only of the
popular VHLL/scripting languages which doesn't support defining of
constants in the core language:

JavaScript has "const foo = 1;"
PHP has "const foo = 1;"
Perl has "use constant foo => 1;"
Lua has "local foo <const> = 1"
-----

The reply cut off that part, then a request to switch subject came in,
and you can fit only so many characters in an email subject, so words
"appears to be" and "popular" got skipped.

> turns out to be the case. Python is very rarely as unusual as people
> often make out.
> 
> To my knowledge, there are quite a few other languages that don't
> have constants, some of them are even moderately well known languages:
> 
> - Mathematica
> - Scheme
> - Powershell and other scripting languages like bash
> - Applescript and Hyperscript
> - Ruby (the compiler only issues a warning if you re-assign 
>   to one, it doesn't enforce the constantness).

Thanks for mentioning Ruby, dunno how I forgot to look it up. And I'm
not surprised that they did something about const'ness, even though
they seem to fall into half-measures.

> I daresay there are many others.
>
> I'm not arguing here for or against constantness, but only pointing
> out that Python is in good company when it comes to lack of constants.

There's unlimited number of scripting languages which don't offer
const'ness. Any freshman student writing their own first language would
make it such.

The point made is that among general-purpose, popular scripting
languages, many adopted a concept of const'ness to the language core,
with Python, sadly, being at the tail.


-- 
Best regards,
 Paul                          mailto:pmis...@gmail.com
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/O73WUSYTEFZSNRNDLVTGWVFDKVUZS5BR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to