Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wish : open type #8095

Closed
vicuna opened this issue Apr 11, 2003 · 1 comment
Closed

Wish : open type #8095

vicuna opened this issue Apr 11, 2003 · 1 comment
Assignees

Comments

@vicuna
Copy link

vicuna commented Apr 11, 2003

Original bug ID: 1629
Reporter: administrator
Assigned to: @mshinwell
Status: resolved (set by @mshinwell on 2016-12-06T20:53:22Z)
Resolution: not a bug
Priority: normal
Severity: feature
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Nicolas Cannasse
Version: 3.06
OS: WindowsXP
Submission from: newgw.soba-project.org (219.163.8.177)

Bonjour,

Aprés quelques discutions avec Jacques Garrigue, je me suis dit qu'il serait
interessant de pouvoir ajouter un "open" sur un type. En effet, actuellement, si
je possede un module "M" qui définit un type et plusieures valeurs, j'aimerais
pouvoir utiliser ce type (entendre : ses contructeurs, ou ses champs si c'est un
record) sans pour autant avoir à ouvrir/citer l'intégralité du namespace.

Syntaxe proposée:
open M.t

On peut envisager la même chose pour les exceptions et les valeurs, mais
l'utilisation pratique (et la justification sémantique) est moins évidente.
Cependant avoir un "open" sélectif complet nous permettrait de nous rapprocher
des facilités de java en terme de nommage (une sorte d'équivalent à import, qui
ne justifierai pas d'aprés moi l'introduction d'un nouveau mot-clé)

Nicolas Cannasse

@vicuna
Copy link
Author

vicuna commented Dec 6, 2016

Comment author: @mshinwell

I think the same effect can be achieved using type-directed disambiguation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants