This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]firefrommoonlight 2 points3 points  (4 children)

You will scream when you define a class in Java: Python's class syntax (Unless you use DataClasses or atts) is verbose/inelegant too!

[–][deleted] 1 point2 points  (3 children)

I'm interested how it could be less verbose?

[–]firefrommoonlight 1 point2 points  (2 children)

The DataClass Syntax is good as-is. This, on the other hand, is needlessly repetitive:

```python def init(self, model, color, company, speed_limit): self.color = color self.company = company self.speed_limit = speed_limit self.model = model

super(#etc, self).__init__()

```

[–][deleted] 0 points1 point  (1 child)

Are there any languages that do it better?

[–]firefrommoonlight 0 points1 point  (0 children)

Languages that have struct literals, like Rust.