Hole expressions #391

Closed
opened 2022-06-16 22:32:09 +09:00 by zxq9 · 1 comment
zxq9 commented 2022-06-16 22:32:09 +09:00 (Migrated from gitlab.com)

Created by: radrow

In Haskell and Scala there is an expression variant called "hole". It represents a yet-unimplemented expression that throws error on build. A nice feature of that is that it can be used to check what the typechecker expects in a given place:

entrypoint test(l) =
  List.head(List.map(???, l)) + 1 // note the question marks
Type error: found a hole of type 'a => int

I propose ??? as it doesn't clash with patterns

*Created by: radrow* In Haskell and Scala there is an expression variant called "hole". It represents a yet-unimplemented expression that throws error on build. A nice feature of that is that it can be used to check what the typechecker expects in a given place: ``` entrypoint test(l) = List.head(List.map(???, l)) + 1 // note the question marks ``` ``` Type error: found a hole of type 'a => int ``` I propose `???` as it doesn't clash with patterns
zxq9 commented 2022-06-17 17:41:26 +09:00 (Migrated from gitlab.com)

Created by: hanssv

Just what every newly converted Solidity developer wants/needs, right? 🤣

*Created by: hanssv* Just what every newly converted Solidity developer wants/needs, right? 🤣
Sign in to join this conversation.
No Milestone
No project
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: QPQ-AG/sophia#391
No description provided.