首页
查找话题
首页
golang 为什么没有三元运算符?
golang 为什么没有三元运算符? 第1页
1
jiang-yong-hang 网友的相关建议:
这么想要三目运算符的话,自己写个函数,传入一个bool两个interface{},返回一个interface{}就好了。
得到返回值再强转类型。
golang 为什么没有三元运算符? 的其他答案 点击这里
1
相关话题
是不是后置类型语言的函数一定要加关键字,不加关键字编译器识别不出吗?
Python 有哪些好的学习资料或者博客?
Matlab/NumPy/C++Eigen 速度差距为什么很大?
为什么 Go 语言能在中国这么火?
Golang、Kotlin、C#、JS、Python等都有协程,市面上的协程有什么本质上的区别?
C 语言中不同类型指针的大小是否完全相同,为什么?
为什么很多人反对编程语言允许非ASCII码标识符?
C/C++中,int a=15;a储存在哪?
为什么大多数程序员不看好图形化编程?
编程语言为什么有变量类型这个概念?
前一个讨论
程序员开发无代码平台成功后会不会被开除?
下一个讨论
漫画《棋魂》里有哪些有趣的细节?
相关的话题
如果一门编程语言中不允许对象(或结构体)循环引用,那么用它实现什么功能会比较困难?
如何从俄乌战争看待推出国产编程语言的紧迫性?
自然语言中有哪些有趣的“语法糖”?
华为自研的「仓颉」编程语言,未来能取代java的地位吗?
大公司为什么无法轻松使用更新的c++版本?
为什么不少程序员认为Matlab的语言设计不优雅甚至比较丑?能否举出一些例子来说明?
SQL 设计得烂吗,诸如redis,nosql又该如何选择?
Java为什么选择interface来作为"接口"这个功能的关键字?
c语言有哪些图形库(非c++)?
如何看待即将发布的 C# 8.0?
为什么 2010 年前后诞生的语言(如 Golang, Rust, Swift)都是强类型 + 静态?
在有能够转化为C、C++、Java的第四代语言Raptor的情况下,为什么还需要C等程序设计语言?
如何使用 python 写一个简单的表达式解释器?
对C++的匿名函数应具有怎样的态度?
C++中 unsigned t = 2147483647 + 1 + 1; 是 UB 还是 ID?
如果计算机是由中国人发明的,那么编程时写代码会是全中文吗?
现代C/C++编译器有多智能?能做出什么厉害的优化?
c/c++语言中,如果不把声明和实现分开,而是直接一起写到头文件中,会有什么不好的影响?
C++20 即将到来的 coroutine 能否与 Golang 的 goroutine 媲美?
如何评价 Fortran 语言热度的回升?
有没有必要让 12 岁孩子学 C++?
江湖上流传着哪些关于R大RednaxelaFX的黑暗传说?
有哪些较好的 C 语言程序源码可供新手临摹参考?
强类型语言的优缺点是什么?
怎么看待 Linus 和 Richard Stallman 对 C++ 的态度?
C「带坏了」多少程序语言的设计?
大一新生入学半个月,有比赛需要一个月造出红外循迹智能车,会C语言和c++,要怎么开始入门?
C++过于复杂为什么不被淘汰?
倒序输出字符串c++为啥不行?
Python 在大部分领域都能胜任,为什么很多企业转向了 Golang?
服务条款
联系我们
关于我们
隐私政策
© 2024-09-27 - tinynew.org. All Rights Reserved.
© 2024-09-27 - tinynew.org. 保留所有权利