This is a bit of a bikeshed, and it’s really late to raise this question (I’ve been stewing on it for a while). But I feel like our constructor convention of using an associated
new fn is a bit longer than necessary and inconsistent with tuple structs and enum variants. I am curious what people think of the idea that the “default” constructor for a type
Foo just be a fn called
Cast your votes:
- I like it!
- I hate it!
- and so on.
- Fits with many modern languages (e.g., Python, I think Ruby, I’m sure more)
- Fits with tuple structs and enum variants.
- One use statement gets the type and the constructor (as today)
- Churn, but we are doing a lot of “convention setting”
- Requires creating fns that don’t fit the snake-case naming convention
Anyway, this is kind of just a poll to test the temperature out there.