News for hackers. Stuff that matters.
Re:Toward Go 2 by weberc2 on Friday July 14, 2017 @09:05AM (#14769457)
This is all very neat, but I think Go could do all of this too, except that "query compile time" would happen on application init or on the first query or some such. Still, very cool and good work to the diesel team!
Re:Toward Go 2 by kuschku on Friday July 14, 2017 @11:03AM (#14770290)
The whole point of an ideal type system is that if code compiles, it is provably correct and won’t have bugs.

Few typesystems come close to that (Coq is one of the few languages where the system might be advanced enough), but generally you want to completely remove entire classes of errors.

Re:Toward Go 2 by weberc2 on Saturday July 15, 2017 @10:00AM (#14776632)
I don't disagree, but I also don't see how our comments relate... Are you sure you meant to reply to me?
Re:Toward Go 2 by kuschku on Saturday July 15, 2017 @11:52AM (#14777258)
Yes, because Go couldn’t do all that on compile, which is the entire issue. It can’t prove the type safety of your SQL query at compile time, or the type safety of your generics usage.
Re:Toward Go 2 by steveklabnik on Friday July 14, 2017 @09:14AM (#14769506)
Sure, and you get runtime errors instead of compile time errors. That's the point.
Re:Toward Go 2 by weberc2 on Saturday July 15, 2017 @10:02AM (#14776646)
I understand; I wasn't comparing the languages, only making an observation.