News for hackers. Stuff that matters.
Re:3.5 Years, 500k Lines of Go by jy3 on Friday March 24, 2017 @02:05PM (#13950899)
I think you are missing the point. Of course you can't assume what a function will do with certainty.
Re:3.5 Years, 500k Lines of Go by pjmlp on Friday March 24, 2017 @02:20PM (#13951008)
From CS point of view + is just a function name just like any other.

A concept used in lambda calculus, introduced in computing since Lisp exists.

Also part of abstract mathematics field, where operator symbols get defined for the proofs.

Re:3.5 Years, 500k Lines of Go by sagichmal on Friday March 24, 2017 @04:41PM (#13952060)
> From CS point of view + is just a function name just like any other.

From a Go point of view, it isn't.

Re:3.5 Years, 500k Lines of Go by pjmlp on Friday March 24, 2017 @04:50PM (#13952121)
Just because Go eschews decades of CS knowledge, in the name of the "easy to hire programmers" for Google[1], it doesn't make it less true.

[1] - According to the language designers own words

Re:3.5 Years, 500k Lines of Go by sagichmal on Friday March 24, 2017 @05:22PM (#13952317)
What you wrote isn't a universal truth. In Go, + is not a function like any other. There's no argument to this.
Re:3.5 Years, 500k Lines of Go by dahauns on Friday March 24, 2017 @09:31PM (#13953570)
What is the difference, apart from the notation?
Re:3.5 Years, 500k Lines of Go by sheepmullet on Friday March 24, 2017 @07:05PM (#13952955)
The point is in most languages operator overloading is no more complex than a method call.

It's not exactly magic.

Re:3.5 Years, 500k Lines of Go by nuggien on Friday March 24, 2017 @09:40PM (#13953601)
Overloading + could be magic if you want it to be. In go, + is exactly what you think it is. In languages with operator overloading, I literally could make + do whatever I wanted to.
Re:3.5 Years, 500k Lines of Go by pjmlp on Saturday March 25, 2017 @04:48AM (#13954671)
Just like you can make a function do something totally unrelated to how it is called, do what it is actually in the name, wipe out the hard drive, launch missiles, whatever.