Compile-time parameters in Zig: a possible solution to generic functions and data structures in Go?

86 views
Skip to first unread message

Nicolas Grilly

unread,
Oct 17, 2017, 4:52:55 PM10/17/17
to golang-nuts
Hello,

I just read about the concept of compile-time parameters in Zig (a new programming language designed to replace C):


Could it be a way to provide generic functions and data structures in Go?

I note we already have some kind of "compile-time feature" with constants.

Nicolas Grilly

Bryan Mills

unread,
Oct 17, 2017, 10:46:15 PM10/17/17
to golang-nuts

(Note that in my proposal, “compile-time” is a property of the function rather than the parameter. From what I can tell the implications of that difference are minor.)
Reply all
Reply to author
Forward
0 new messages