Overloading
Overloading
Posted Apr 26, 2014 13:57 UTC (Sat) by aggelos (subscriber, #41752)In reply to: Overloading by rsidd
Parent article: Porting the Go compiler to Go
The other extreme is OCaml which has different operators for integer and floating-point arithmetic. Now that makes code harder to read, or write.Actually, I've found that to be quite helpful when writing code and I don't think +. (floating point addition operator in OCaml) is any harder to read than + (integer addition). Same for lack of automatic integer type promotions (wish I could opt out of that in some C code). I don't doubt there's programs where the extra type conversion calls would get in the way, but for most of the programs I write these days, it's nice when the type system discourages sloppy thinking about arithmetic. YMMV :-)
Posted Apr 26, 2014 14:34 UTC (Sat)
by rsidd (subscriber, #2582)
[Link]
Overloading
