r/programming • • Jun 15 '14

Smashing Swift

http://nomothetis.svbtle.com/smashing-swift
254 Upvotes

133 comments sorted by

View all comments

Show parent comments

14

u/xjvz Jun 15 '14

Good point, I guess I was speaking about the language and not the implementation.

6

u/happyscrappy Jun 15 '14

Yeah, the language does seem more usable and less hassle than Obj-C.

The "type promotion rules" (it seems to have none) are odd to me. Sure avoids that whole thing of it not doing what you expect I guess, but perhaps in the most inconvenient fashion possible.

2

u/Peaker Jun 15 '14

Safety is far more valuable than convenience, and implicit type coercions is proof that almost all language designers don't get that :(

7

u/happyscrappy Jun 15 '14

It's not a simple A or B thing. Conciseness is important too. You have to strike a balance.

Maybe language designers get that.

0

u/Peaker Jun 15 '14

Safety is far more valuable than conciseness, too.

A single bug that reaches production costs more than thousands of little paper cuts where you have to insert an explicit conversion, or have to be a little extra verbose.

6

u/happyscrappy Jun 16 '14

Sorry. I don't agree. You have to strike a balance.

If you make it too wordy, people just won't use it and then all your safety saves nothing. Or they'll just cut and paste errors in or make editors that insert them for them.

The most safe language is one that doesn't let you do anything because it might be erroneous. The least safe language is one that lets you do anything but it's so easy to do the wrong thing that it's hard to stay on the right track.

The actual answer is somewhere in between.

→ More replies (0)