Comments (4)
This creates an ambiguity issue with let
bindings: let PARAM = PARAM2
now has no syntactic difference from let port = port2
. Should we change let port = port2
to let port p= p2
or something like that? @rachitnigam
from filament.
No, this is why itβs a non trivial change because it requires syntax disambiguating to figure out what is a port, a param, and an event.
from filament.
Let me expand on the comment above a little bit. This ambiguity problem shows up almost every single language. For example, in Rust, type identifier, struct names, and variables all use the same syntax:
struct Foo;
type Bar = Foo;
fn baz(x: Bar) {
let Bar = x;
}
The problem for the rust frontend is to look at this code and figure out the correct binding for each symbol. In this case, the position of each identifier exposes the binding chain we need to look at. When you look at type <ID> = <Expr>
, the Expr
can only mention other identifiers in the type name bindings. Similarly, when looking at let <ID> = <Expr>
, we know that Expr
comes from the identifiers defined as variables.
The reason Rust doesn't have to do what Filament does, which is have distinct looking identifiers for different kinds of terms, is because it separates the frontend from the core representation(s). Now that we also have that separation in Filament, what we should actually do is remove the syntactic difference between ports, params, and events completely and use astconv
to resolve these things for us.
from filament.
We've made this change!
from filament.
Related Issues (20)
- Current website formatting doesn't meet WCAG text accessibility guidelines HOT 1
- Build docker container for all ADL tools HOT 2
- Generic bundle transformers
- Cleanup deadline code
- Shortform syntax for external parameter access HOT 1
- Unused variable warning
- BLAS evaluation HOT 1
- Partial Streaming FFTs HOT 3
- ASIC Flows for Evaluation HOT 2
- Instance borrow syntax should support references to instance's existential parameters HOT 4
- Bundle assignments of same length HOT 1
- Add a way to specify global values used in the gen framework
- No longer testing against rust panic messages
- Removing reliance on calyx dockerfile
- If-expressions for parameters HOT 1
- Providing parameters to `main` component on compilation. HOT 3
- Externally-provided parameters HOT 4
- Extend assert syntax HOT 1
- Better error message for `attempt to subtract with overflow` HOT 1
- Higher order Filament HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from filament.