Comments (5)
One weird idea:
foo : {| x : Int, y : String |}
foo = (| x = 1, y = "hello" |)
from pikelet.
Reposting some comments from Gitter:
@aatxe https://gitter.im/pikelet-lang/Lobby?at=5af303ad00dc488804a8994d
I'm inclined to say the second option [
sig
/struct
] then since I think my preference is something like "no keywords > lowercase single word keywords > anything else"
@brendanzab https://gitter.im/pikelet-lang/Lobby?at=5afad494e0b50c2d05c3612f
One annoying thing about
sig
/struct
is that they are really different in length. Looks kinda icky.
Also I findrecord
to be a prettier word
@evincarofautumn https://gitter.im/pikelet-lang/Lobby?at=5afb2d7ef04ce53632dd1ad3
This is a hard one because it’s kind of an abstract distinction in English—what something is (thing/existence) versus what it is (type/attributes). Difference between “I am Jon” and “I am a human”.
record { .. } : record of { .. } rec { .. } : rectype { .. } data { .. } : datatype { .. } { .. } : {| .. |} {| .. |} : { .. } { .. } : type { .. }
For the last one, type could put the parser in “type mode” to disambiguate. (In Kitten I was careful to make sure that it’s always clear whether you’re parsing a term or a type, so I can have overlapping grammars without ambiguity.)
from pikelet.
I don't really like the record
syntax. It will make it extremely ugly to write nested records. Would it be better to use a different syntax for implicit args instead? Maybe you could use a sigil like
id: ?(a: Type) -> (x: a) -> a
id: '(a: Type) -> (x: a) -> a
(Sorry if this was already discussed on gitter. Also, this looks like a really cool project 👍 💯.)
from pikelet.
Yeah, no worries!
It will make it extremely ugly to write nested records.
I agree too fwiw. A different sigil for implicit args could definitely be a solution. 🤔
from pikelet.
(Sorry if this was already discussed on gitter. Also, this looks like a really cool project 👍 💯.)
Don't worry about repeating stuff from Gitter. I try to make sure stuff eventually ends up on Github in a less ephemeral form, so appreciate the chatting and discussions on here! I realise that it's sometimes easier for people to dip in and out of the issues at their leisure rather than keeping up to date with the chat. Also, I appreciate the compliments, it means a lot!
from pikelet.
Related Issues (20)
- Turn theory appendix in book into the Pikelet specification HOT 6
- Fix ambiguous dependent function syntax HOT 1
- Pattern match compilation
- Don't panic on mismatched number of record fields
- Get Pikelet to build on wasm HOT 14
- Terminology bikeshed: Universe shifting/lifting/embiggening HOT 5
- Rename signed integer types
- Allow fields to be shifted
- Add a list of keywords to the docs
- Remove `of` keyword from case expressions
- Pikelet driver/loader API HOT 12
- Package manager HOT 4
- Add a top-level integration test suite
- Move away from using Moniker for variable binding HOT 7
- Try using Logos for the lexer HOT 1
- Merge next branch into master
- Fix unfolding avoidance for local variables
- Experiment with Andras Korvacs' version of universe lifting HOT 5
- Workspace doesn't build on a headless linux system HOT 1
- Cannot build with modern versions of Rust
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 pikelet.