Replies: 11 comments 1 reply
-
Do we need to change anything in the language to get a formal specification? I think the question of whether or not we need to change symbol names (which I'm skeptical of (*)) is separate from the question of what, if anything, needs to be changed to make a formal specification possible (or having some as-yet-unspecified properties that currently cannot be had). (*) I think most arguments relating to " |
Beta Was this translation helpful? Give feedback.
-
When keywords you think should be reserved sometimes are reserved and sometimes aren't making proper formal specification might be tricky. To give an example. Is Documentation says:
Most developers will also say that it is a top level function. And I say that it is, and it isn't and to some extend it can be redefined by developer. All at the same time. This is where language should be more restrictive than it is right now. |
Beta Was this translation helpful? Give feedback.
-
Can we gather here (or in separate ticket) list of all rules that should apply to Clarity alongside with notes if they are already fully enforced by VM or not? This will help create draft of formal specification and allows us to understand how Clarity works, what doesn't work as it should, what needs to be fixed or redefined to make it future proof (as much as it is possible). I'm talking about stuff like:
CC: @obycode @lgalabru @jcnelson @kantai @shea256 @muneeb-ali |
Beta Was this translation helpful? Give feedback.
-
The new parser will improve on some of these items already. It should solve all of the whitespace issues for example. |
Beta Was this translation helpful? Give feedback.
-
The thing is that we don't know what should be improved, especially when it comes to things that are not defined. So if you change something in the parser, how can we tell if you are doing it correctly or not? I strongly believe that language implementation should be done based on language definition/specification, not the other way around. |
Beta Was this translation helpful? Give feedback.
-
Yes, definitely agree on that point. |
Beta Was this translation helpful? Give feedback.
-
Indeed. It will also help to document design decisions and their rationale, and open for a more participatory process that benefits from the experience of the broader community instead of just developers involved in the implementation. Design decisions and rationale should be documented, not buried in pull requests. |
Beta Was this translation helpful? Give feedback.
-
It would be beneficial to not allow whitespace after open parens. It will make formatting of Clarity more regular and conventional. For example, this rule will eliminate misusing whitespace in a (let (
(try! (try-me fail)) Edit: see issue #3198 |
Beta Was this translation helpful? Give feedback.
-
I'm definitely supportive of developing a specification for Clarity. I think there's ultimately a bunch of different components of this -- the syntax, the general rules of evaluation, rules for each function and special functions, and maybe more. Some of these are easier to ensure a thorough specification that others. For example, there's well established practices for specifying a complete language syntax, but there's no well established way to specify the "rules of evaluation" (people do make formal VMs, but they are still essentially procedural rather than declarative). I think collecting a specification over all these things into a document makes sense, and in the places where the specification differs from the Stacks 2.0 implementation (or the Stacks 2.1 implementation), we could highlight that, and ultimately package the document into a SIP (if it contains changes to 2.0 or 2.1, it'll need an activation section). |
Beta Was this translation helpful? Give feedback.
-
Temporarily assigning to @obycode so someone owns this. Please feel free to re-assign. |
Beta Was this translation helpful? Give feedback.
-
I think this may make sense to convert to a discussion -- but if people like this remaining an issue, feel free to push back! |
Beta Was this translation helpful? Give feedback.
-
This issue is moved from hirosystems/clarinet#465.
With the switch to 2.1, we have the opportunity to make some breaking changes to the language. It would make sense to put together a formal specification of the language, including some breaking changes (e.g. limitations on symbol names like
this<is>con/fus!ing*
). It would be nice to have a BNF specification (or something else).#2696 is related - it discusses reserved keywords.
Comment from @fariedt on original issue:
Beta Was this translation helpful? Give feedback.
All reactions