Comments (5)
Thanks! Wonder what this is about…
from dssl2.
I agree it’s a bug, not just QOL. I think the curly brace syntax for struct construction is kind of neglected—I usually don’t use it since it’s more verbose.
from dssl2.
I can’t seem to reproduce this. In particular, this works for me:
#lang dssl2
struct Account:
let id
let type
let balance
struct customer:
let name
let bank_account
let customers = [
customer { name: 'Alice', bank_account: Account(1, 'savings', 10) },
customer { name: 'Bob', bank_account: Account(2, 'checking', 5) }
]
In your example is customer
by any chance imported from another module? That isn’t supported for… reasons.
from dssl2.
(That was wrong. It should also work when imported.)
from dssl2.
Sorry for not following up on this -- didn't see the notification when this was relevant...
Seems like it's my fault somewhere -- I'd close this as a non-issue.
from dssl2.
Related Issues (20)
- Multi-line comment/uncomment operations in DrRacket HOT 1
- Classes should be contracts
- Varargs functions and varargs application
- Add op-assign operators such as `+=`, `-=`, etc. HOT 2
- Different behavior when compiled with `raco make`
- Bad Error Message with Dynamic Arrays HOT 2
- Suboptimal error message when setting non-existing field HOT 1
- NaN and infinity print as "+nan.0", "+inf.0", "-inf.0" HOT 1
- Grader tests fail in terminal
- Fix tests for grader. HOT 1
- Very first example in the docs is not working DSSL2 HOT 1
- Bad error message when accidentally setting a method
- Bad Error Message for Use Before Definition
- Dssl2 Installation Issues HOT 1
- Hard to define recursive contracts/structs HOT 2
- Nested Higher-Order Contract Oddities
- Identifiers in code in documentation aren't linked HOT 1
- All functions print as "...e/parametric.rkt:82:10" HOT 1
- Documentation for standard library HOT 1
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 dssl2.