this post was submitted on 05 Feb 2025
7 points (100.0% liked)

Scala

363 readers
1 users here now

founded 2 years ago
MODERATORS
 

I think this is awesome. One of the only pain points I have with Scala is collection literals.

you are viewing a single comment's thread
view the rest of the comments
[–] smoredahl 1 points 2 weeks ago (1 children)

I understand your perspective, but I argue that there is a difference between adding a new feature that is unique to your language (I think we would both agree that Scala does not need any more of these), and adding a feature that makes the language more consistent with the syntax that most people coming from other languages expect to be there.

I teach Scala at a university level, so I very much do care about learners and beginners. In my opinion, having a syntax for collection literals would make the language a little more approachable, as my students are coming from languages that do provide this syntax (e.g., Python).

[–] [email protected] 1 points 2 weeks ago (1 children)

@smoredahl That's an absolute dog shit reason to be completely honest.

No matter how familiar it makes the language, it increases the inconsistency within the language itself, not to mention the complexity that comes with it.

I have a whole presentation about how stupid increasing familiarity at the expense of simplicity and consistency is.
One of the core reason why we can't have nice things in computing.

[–] smoredahl 1 points 2 weeks ago (2 children)

I see what you're saying, but isn't familiarity worth something? After all, Brainfuck is incredibly simple and consistent :)

[–] [email protected] 1 points 1 week ago* (last edited 1 week ago)

@smoredahl Familiarity is designing for existing users, simplicity is designing for everyone; see https://soc.me/languages/familiarity.

(I have had this discussion many times. I have heard every single argument on why *this* time repeating a past mistake for familiarity is good. It never works out.)

> After all, Brainfuck is incredibly simple and consistent :)

By that measure C++ should be very familiar, because it contains every feature ever imagined by someone. We know how that one worked out.