且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Julia:实例化类型参数

更新时间:2022-10-16 17:46:18

It is currently not possible to restrict type parameters like this, though there has been discussion to allow the syntax that you tried up at the top. I believe that the solution that you came up with of checking the type parameter in an inner constructor is considered the best practice right now.