News for hackers. Stuff that matters.
Re:Less is more: language features by hacknat on Monday April 13, 2015 @08:18PM (#9371353)
It's interesting to see that recent languages are making strides towards this list.

* Golang does away with inheritance and exceptions.

* Rust does away with mutability, or at least makes it explicit.

I wonder if a convenient language with all of these taken out could exist. I'm skeptical about a single number-type.

Also, wouldn't reference equality simply be gone if you take away pointers?

Also, his point about interfaces is pretty narrow, not every interface's manipulation can be characterized by one or one set of manipulations. I think Golang is a fantastic example of a language that forces a role-based interface pattern.

Re:Less is more: language features by pcwalton on Monday April 13, 2015 @09:05PM (#9371493)
Rust also lacks goto, "raw" pointers, null pointers, inheritance, general reflection, and cyclic dependencies. It also has very limited exceptions (as panic can only be caught at thread boundaries) and prefers structural equality syntactically to reference equality (although reference equality is possible).

Also, Go has exceptions as described here. Panic and recover allow the same semantic power, since every exception-based program can be easily transformed into the equivalent program with Go panic/recover, and vice-versa.

Re:Less is more: language features by brandonbloom on Monday April 13, 2015 @08:40PM (#9371412)
> Also, wouldn't reference equality simply be gone if you take away pointers?

You don't need to expose a pointer datatype to offer a reference equality check operation. Java, JavaScript, C#, etc, all do reference equality by default for user-defined classes.

Re:Less is more: language features by aikah on Tuesday April 14, 2015 @01:44AM (#9372326)
> * Golang does away with inheritance and exceptions.

Meh,regarding exceptions you still have errors that you bubble up by returning them. It's hardly different from exceptions.

On the other hand, Go went way too minimal with its type system so much that, you can opt out with inteface{} because it's not expressive enough. I would prefer no interface {} , no reflection ,but to allow types as parameters and value.Which they are not in go.

finally, go has GOTO ... I would have gotten rid of that at first place.

Re:Less is more: language features by rakoo on Tuesday April 14, 2015 @08:59AM (#9373827)
> you still have errors that you bubble up by returning them. It's hardly different from exceptions.

It's completely different: you have to manually bubble them if you want them to bubble. You can perfectly not deal with them.

Yes, the initial reaction to seeing an err pop up is to return it. No, you don't have to return it.