News for hackers. Stuff that matters.

heythere124

Re:Typed nils in Go 2 on Friday August 11, 2017 @04:42AM (#14987733)
Python does that too.
Re:Theranos Low on Cash After Settlement with Walgreens on Wednesday August 02, 2017 @03:35PM (#14913863)
Since when is discrimination based on IQ illegal?
What would you do with smaller businesses when you decide to quit/retire and they need to take control of their own websites?
The point is that they can still. Whatever the standard for taking time off work for illness it should apply equally to both genders so there should never be any need for a separate rule/law.
Re:Benefits of named return values in Go on Friday June 30, 2017 @10:09AM (#14670806)
Not sure those optimisations are worth much. And it's only safety by forcing lowest common denominator code and making you justify everything to a dumb compiler. Rust serves a niche, but it is a tight niche IMO.
Re:Benefits of named return values in Go on Friday June 30, 2017 @08:25AM (#14670263)
Your "solution" is possible in many languages. It's just to give threads complete ownership of data they use. It doesn't require a special type system.

In general I don't think Rust actually adds much abstraction that isn't already in say Python. What it does is enforce tight constraints.

Re:Benefits of named return values in Go on Friday June 30, 2017 @08:18AM (#14670228)
time.Sleep(1000) could be replaced with a real syncing mechanism of some kind -- it's only for illustration.
Re:Benefits of named return values in Go on Friday June 30, 2017 @07:02AM (#14669841)
Not my area of expertise and it is yours, but if you eliminate a zero instruction before a copy instruction how can you be sure that doesn't affect other threads?

  var x Int
  // Pass x to a thread by reference
  x = 0
  time.Sleep(1000)
  x = 1