IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

Vous êtes nouveau sur Developpez.com ? Créez votre compte ou connectez-vous afin de pouvoir participer !

Vous devez avoir un compte Developpez.com et être connecté pour pouvoir participer aux discussions.

Vous n'avez pas encore de compte Developpez.com ? Créez-en un en quelques instants, c'est entièrement gratuit !

Si vous disposez déjà d'un compte et qu'il est bien activé, connectez-vous à l'aide du formulaire ci-dessous.

Identifiez-vous
Identifiant
Mot de passe
Mot de passe oublié ?
Créer un compte

L'inscription est gratuite et ne vous prendra que quelques instants !

Je m'inscris !

Rust 1.47.0 est disponible et s'accompagne de la prise en charge par défaut de LLVM 11
Ainsi que de neuf API qui passent en version stable dans la bibliothèque

Le , par Stéphane le calme

397PARTAGES

16  0 
Vous avez lu gratuitement 124 articles depuis plus d'un an.
Soutenez le club developpez.com en souscrivant un abonnement pour que nous puissions continuer à vous proposer des publications.

Une erreur dans cette actualité ? Signalez-nous-la !

Avatar de Pyramidev
Expert éminent https://www.developpez.com
Le 08/10/2020 à 22:20
Tiens, Rust ajoute la constante TAU. Ce n'est pas la fonctionnalité du siècle, mais c'est amusant.

Cela me rappelle Python 3.6 dans lequel Guido van Rossum avait validé l'ajout de math.tau (PEP 628) malgré la protestation de Raymond Hettinger.
Citation Envoyé par Raymond Hettinger
* The push to use of "tau" has the flavor a political fad or wishful thinking that may or may not succeed. The math module should only implement established practice.

* Since not everyone knows or uses tau, its use would tend to make code less clear. As a reviewer, I would ask that code like "from math import tau" to be changed to "from math import tau as twopi". The latter is more clear to most users (how many people would recognize "tau * r" when it occurs in the middle of a larger expression?).

* I've surveyed engineers in my recent Python courses (often with Physics, EE, MaterialScience, DSP, or CompSci backgrounds and not a single one of them had heard of this constant).

* If people really wanted this, we would be seeing more cases of "tau = 2.0 * math.pi" in code. Google searches and Github code search shows that this is very rare.

* It is already trivial to write "tau=2.0*pi" so why bother?

* Adding mysteriously named constants degrades the usability of the math module where many of the tools are currently self-evident but not all (
tau is a number, gamma is a function, and what the heck is a frexp?).

* Also, the name "tau" is already used for other purposes in various contexts (shear stress, proper time in relativity, torque, tau lepton, optical depth in astronomy, time contacts in RC circuits, etc).
Citation Envoyé par Guido van Rossum
It's okay if Python occasionally shows its lighter side in unexpected places. Think of the delight of future (junior) high schoolers who discover that Python participates in the tau debate. :-)
Source : https://bugs.python.org/issue12345
1  0