Live data from Hacker News

The power of Result types in Swift

swiftbysundell.com

21–30 of 77 posts

Re: The power of Result types in Swift

#21
post #16

While typing is a good way to reduce programmer errors, specially for large scale programs, it's much like autocomplete in a word processor. It's cool to have but also a bad habit to form. The quality of prgrams would improve if such aids were reduced and the programmer was expected to form good programming habits instead.

This seems like some bizarre luddite-esque argument. We should use computers to aid our work, but not too much!!

It's more an expression of "if it any broke don't fix it" or a minimalist approach to prorgamming.

Re: The power of Result types in Swift

#22
post #13

While typing is a good way to reduce programmer errors, specially for large scale programs, it's much like autocomplete in a word processor. It's cool to have but also a bad habit to form. The quality of prgrams would improve if such aids were reduced and the programmer was expected to form good programming habits instead.

What would a typeless language look like?

C. Just basic data types.

Re: The power of Result types in Swift

#23

While typing is a good way to reduce programmer errors, specially for large scale programs, it's much like autocomplete in a word processor. It's cool to have but also a bad habit to form. The quality of prgrams would improve if such aids were reduced and the programmer was expected to form good programming habits instead.

We should also remove airbags and seatbelts in automobiles. Surely then better driving habits would form.

It's more like pre-tensioners in seatbelts are not as neccessary as seatbelts themselves.

Re: The power of Result types in Swift

#24
post #16

Earlier quoted context omitted.

This seems like some bizarre luddite-esque argument. We should use computers to aid our work, but not too much!!

It's more an expression of "if it any broke don't fix it" or a minimalist approach to prorgamming.

Programming is broken though. If it weren't, we wouldn't have so many issues with our main operating systems and popular applications.

The desire to remain ignorant of the problems (by not using tooling which can reveal it) is remarkably popular, however. Enjoy your bliss!

Re: The power of Result types in Swift

#25

Earlier quoted context omitted.

It's more an expression of "if it any broke don't fix it" or a minimalist approach to prorgamming.

Programming is broken though. If it weren't, we wouldn't have so many issues with our main operating systems and popular applications. The desire to remain ignorant of the problems (by not using tooling which can reveal it) is remarkably popular, however. Enjoy your bliss!

Well the tooling you are referring to is more like buildingin an automatic sensor into a basic tool. So it's an enhancement to a basic rtool functionality, not a new tool. I'm only questioning the usefulness of that enhancement, since it results in programmers not caring about a certain aspect of their programming. It's sort of like exception handling, while it exists, it rarely gets activtaed in real programs.

Re: The power of Result types in Swift

#28
post #26

Earlier quoted context omitted.

C. Just basic data types.

C is in no way typeless. Furthermore, i would expect a well behaved dev to avoid c at all cost.

Well, this article is about Result types in Swift, and my point is, I think this kind of thing is overkill. It tends to make the learning curve for a new programmer steeper because there's all these extra bells and whistles provided by the language that have to be learnt before you can get going, and then you have sample code and tutorials and so on. Learning and using C was and is a lot simpler than say Swift.

Re: The power of Result types in Swift

#29

While typing is a good way to reduce programmer errors, specially for large scale programs, it's much like autocomplete in a word processor. It's cool to have but also a bad habit to form. The quality of prgrams would improve if such aids were reduced and the programmer was expected to form good programming habits instead.

I've read many people complain about static typing + more advanced type systems making programming too hard. This is the first time I've ever read someone assert that they make programming too easy.

Re: The power of Result types in Swift

#30
post #13

While typing is a good way to reduce programmer errors, specially for large scale programs, it's much like autocomplete in a word processor. It's cool to have but also a bad habit to form. The quality of prgrams would improve if such aids were reduced and the programmer was expected to form good programming habits instead.

What would a typeless language look like?

"In BCPL,flexibility is retained by eliminating the concept of data types and representing all quantities by bit patterns of the same length. A single vector may, for example, hold bit patterns representing numbers, booleans and pointers to other vectors. Variables are declared before use, but simply as variables, not as variables of any particular type."

See chapter 13 example BCPL programs:

http://www.cl.cam.ac.uk/~mr10/bcplman.pdf

See chapter 13 example MCPL programs:

http://www.cl.cam.ac.uk/~mr10/mcplman.pdf

Post reply on HN