支持隐式"a la Scala"的其他编程语言包括: [英] Other programming languages that support implicits "a la Scala"

查看:105
本文介绍了支持隐式"a la Scala"的其他编程语言包括:的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Scala隐式功能非常强大.我很好奇它们是否是Scala的新功能/独特功能,还是其他编程语言中已经存在的概念.

Scala implicits are very powerfull. I'm curious if they are a new/unique feature of Scala, or the concept already existed in other programming languages.

谢谢.

编辑:

为澄清我的问题,是的,我正在谈论这个具体的实现.一开始,到处都有隐式事物"似乎很奇怪,但是使用了一段时间之后,看到其他人如何使用它,我对它的运行效果印象深刻.

To clarify my question, yes, I'm talking about this concrete implementation. Having "implicit things" all around seemed strange at first, but having used it for a while and seeing how others use it, I'm impressed by how well it works.

推荐答案

灵感似乎是Haskell的类型类.至少有一篇博客文章声称隐含它们起源于Haskell类型类;该文章引用了Martin Odersky在2006年发表的一篇论文,标题为穷人类型分类.丹尼尔·索布拉(Daniel Sobral)最近写了一篇有关如何模拟类型类的文章.带有隐式.

Looks like the inspiration was Haskell's type classes. At least one blog article claims that implicits have their origin in Haskell type classes; the article refers to a 2006 paper by Martin Odersky entitled, Poor Man's Type Classes. And Daniel Sobral wrote a recent article on how to simulate type classes with implicits.

这篇关于支持隐式"a la Scala"的其他编程语言包括:的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆