| <<O>> Difference Topic NiceVersusScala (r1.22 - 26 Jul 2005 - TWikiGuest) |
| Changed: | |
| < < |
Every Scala expression has a value, so there are fewer explicit return statements - I'm familiar with that from Smalltalk, so it's difficult to judge if I just like it because it's familiar. In some cases Scala syntax seems more consistent; Nice seems to extend Java and so add syntax. For example, def square(x: Int) = { var y=x; y*y } and def square(x: Int) = x*x; whereas Nice has int square(int x){ var y=x; return y*y; } and a shorthand form int square(int x) = x*x;
|
| > > |
Every Scala expression has a value, so there are fewer explicit return statements - I'm familiar with that from Smalltalk, so it's difficult to judge if I just like it because it's familiar. In some cases Scala syntax seems more consistent; Nice seems to extend Java and so add syntax. For example, in Scala there is def square(x: Int) = { var y=x; y*y } which can be shortened to def square(x: Int) = x*x; whereas in Nice it is int square(int x){ var y=x; return y*y; } and the shorthand form is int square(int x) = x*x; |
| <<O>> Difference Topic NiceVersusScala (r1.21 - 03 Apr 2005 - TWikiGuest) |
| Deleted: | |
| < < | 化工泵 净化设备 稳压电源 初级会计师 留学签证 珠海生活 波峰焊 晶振 移动PC 视频点播 聊天室 消毒 越野车 电容器 电磁阀 类风湿 留学专家 首饰 晶体 内存 东莞生活 拓展训练 股票证券 留学中介 广告 电教 液晶屏 超声波 桌面 黑客帝国 挤出机 汽车租赁 消毒液 博天堂 投影仪 黄历 液晶显示器 温控器 动画 屏幕保护 白癜风 垫片 证券 电热膜 主机 户外 扑克 防火墙 肝硬化 注册税务师 广东生活 逆变电源 北京现代汽车 枫叶卡 资源库 风湿 脉管炎 汇款 电脑报价 西联 工作站 监控 广州生活 空间租用 信息化 螺丝 套管 外语 强直性脊柱炎 邮件系统 办公楼 胶粘剂 压力变送器 电线 铃声 皮具 星座 扣件 印花 工商注册 温度计 实验台 歌曲下载 文化 工业控制 雨伞 管理咨询公司 证卡打印机 液压件 注册 助剂 豆粕 胰岛素泵 电子元件 链条 流水线 防爆电机 水处理公司 水产品 紧固件 铸件 保健品 粉末涂料 文件柜 工装 隔离器 中药 手推车 光通信 喷涂设备 铸造 绿茶 宽带接入 计算机学校 工控 激光测距仪 清洗机 尖锐湿疣 网络布线 手电筒 读卡器 网络维护 数码管 栈板 蜂胶 打码机 思科 托盘 免费下载 野营用品 护肤 絮凝剂 色织布 护肤品 儿童玩具 人才招聘 旅游用品 减速电机 金属材料 不锈钢制品 癫痫 电视 电视剧 电工工具 电动摩托车 客车 抛光 黄页 磨床 洗地机 木门 圆珠笔 铜门 调节阀 搜索引擎 环境实验设备 塑料管材 呼吸机 节能 电解电容 网页 医疗 司法考试 结婚 防腐涂料 玻璃仪器 书店 光盘制作 医药 音乐网站 臭氧 网球 铁柜 医院管理 洗衣 致富信息 冠心病 保姆 报关 法语 散热片 毛巾 形象设计 |
| <<O>> Difference Topic NiceVersusScala (r1.20 - 27 Jan 2005 - LiYan) |
| Added: | |
| > > | 化工泵 净化设备 稳压电源 初级会计师 留学签证 珠海生活 波峰焊 晶振 移动PC 视频点播 聊天室 消毒 越野车 电容器 电磁阀 类风湿 留学专家 首饰 晶体 内存 东莞生活 拓展训练 股票证券 留学中介 广告 电教 液晶屏 超声波 桌面 黑客帝国 挤出机 汽车租赁 消毒液 博天堂 投影仪 黄历 液晶显示器 温控器 动画 屏幕保护 白癜风 垫片 证券 电热膜 主机 户外 扑克 防火墙 肝硬化 注册税务师 广东生活 逆变电源 北京现代汽车 枫叶卡 资源库 风湿 脉管炎 汇款 电脑报价 西联 工作站 监控 广州生活 空间租用 信息化 螺丝 套管 外语 强直性脊柱炎 邮件系统 办公楼 胶粘剂 压力变送器 电线 铃声 皮具 星座 扣件 印花 工商注册 温度计 实验台 歌曲下载 文化 工业控制 雨伞 管理咨询公司 证卡打印机 液压件 注册 助剂 豆粕 胰岛素泵 电子元件 链条 流水线 防爆电机 水处理公司 水产品 紧固件 铸件 保健品 粉末涂料 文件柜 工装 隔离器 中药 手推车 光通信 喷涂设备 铸造 绿茶 宽带接入 计算机学校 工控 激光测距仪 清洗机 尖锐湿疣 网络布线 手电筒 读卡器 网络维护 数码管 栈板 蜂胶 打码机 思科 托盘 免费下载 野营用品 护肤 絮凝剂 色织布 护肤品 儿童玩具 人才招聘 旅游用品 减速电机 金属材料 不锈钢制品 癫痫 电视 电视剧 电工工具 电动摩托车 客车 抛光 黄页 磨床 洗地机 木门 圆珠笔 铜门 调节阀 搜索引擎 环境实验设备 塑料管材 呼吸机 节能 电解电容 网页 医疗 司法考试 结婚 防腐涂料 玻璃仪器 书店 光盘制作 医药 音乐网站 臭氧 网球 铁柜 医院管理 洗衣 致富信息 冠心病 保姆 报关 法语 散热片 毛巾 形象设计 |
| <<O>> Difference Topic NiceVersusScala (r1.19 - 23 Jan 2005 - TWikiGuest) |
| <<O>> Difference Topic NiceVersusScala (r1.18 - 30 May 2004 - IsaacGouy) |
| Changed: | |
| < < | This at a glance comparison is based on Scala version 1.0.0-b6 and Nice version 0.9.6 |
| > > | This at a glance comparison is based on Scala version 1.0.0-b6 and Nice version 0.9.8 |
| Changed: | |
| < < |
Some of these differences can be seen in the following example. In Scala we use a HashMap defined in a Scala library; in Nice we parameterize the Java HashMap. In Scala we use a sequence comprehension; in Nice an extended for statement, or a Java for statement.
|
| > > |
Some of these differences can be seen in the following example. In Scala we use a HashMap defined in a Scala library; in Nice we use local type inference with the Java HashMap. In Scala we use a sequence comprehension; in Nice an extended for statement, or a Java for statement.
|
| Changed: | |
| < < |
HashMap? |
| > > | let table = new HashMap?(); |
| <<O>> Difference Topic NiceVersusScala (r1.17 - 26 Feb 2004 - IsaacGouy) |
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < | table += Integer.toString(i, 16) -> i; | |||||||
| > > | table(Integer.toString(i, 16)) = i; | |||||||
| Changed: | ||||||||
| < < | Console println(count); | |||||||
| > > | Console.println(count); | |||||||
| Changed: | ||||||||
| < < | if (i>0) i; else 1; | |||||||
| > > | if (i>0) i else 1; | |||||||
| <<O>> Difference Topic NiceVersusScala (r1.16 - 11 Feb 2004 - IsaacGouy) |
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Added: | ||||||||
| > > | Paradoxically, Nice's syntax is closer to Java, and Nice more effectively reuses Java libraries, but in a fundamental way Scala is more like Java - it's based around classes. | |||||||
| <<O>> Difference Topic NiceVersusScala (r1.15 - 27 Jan 2004 - DanielBonniot) |
| Changed: | |
| < < | var i = 1; |
| > > | int i; |
| <<O>> Difference Topic NiceVersusScala (r1.14 - 27 Jan 2004 - IsaacGouy) |
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| <<O>> Difference Topic NiceVersusScala (r1.13 - 26 Jan 2004 - IsaacGouy) |
| Added: | |
| > > | This at a glance comparison is based on Scala version 1.0.0-b6 and Nice version 0.9.6 |
| Changed: | |
| < < | Nice and Scala move forward OO programming in different ways. Nice addresses the problems of adding functionality to existing classes and binary methods with Multi Methods; Scala addresses the problem of implementation reuse with Traits and Mixins. |
| > > | Nice and Scala move forward OO programming in different ways. Nice addresses the problems of adding functionality to existing classes and binary methods with Multi Methods; Scala addresses the problem of implementation reuse with Traits and Mixins. |
| Added: | |
| > > | Someone with a better understanding of type systems could comment here |
| Added: | |
| > > | Of course, both Scala and Nice have other interesting features. |
| Changed: | |
| < < | Made a few additions -- ArjanB - 24 Jan 2004 |
| > > |
OpinionNice Option Types seem to have found a middle course, allowing non-null types to be distinguished without making them harder to use when a value may be null. |
| Changed: | |
| < < | Grateful for the help, I'll continue to add stuff too - then we can reconcile the differences and clean up. (I started off including the list of features from the Scala overview and then removed some.) -- IsaacGouy - 24 Jan 2004 |
| > > |
Every Scala expression has a value, so there are fewer explicit return statements - I'm familiar with that from Smalltalk, so it's difficult to judge if I just like it because it's familiar. In some cases Scala syntax seems more consistent; Nice seems to extend Java and so add syntax. For example, def square(x: Int) = { var y=x; y*y } and def square(x: Int) = x*x; whereas Nice has int square(int x){ var y=x; return y*y; } and a shorthand form int square(int x) = x*x;
-- IsaacGouy - 26 Jan 2004 (thanks Arjan) |
| <<O>> Difference Topic NiceVersusScala (r1.12 - 26 Jan 2004 - IsaacGouy) |
| Changed: | |||||||
| < < |
| ||||||
| > > |
| ||||||
| <<O>> Difference Topic NiceVersusScala (r1.11 - 26 Jan 2004 - ArjanB) |
| Added: | |
| > > |
|
| Added: | |
| > > | |
| Changed: | |
| < < | |
| > > |
|
| Added: | |
| > > | |
| <<O>> Difference Topic NiceVersusScala (r1.10 - 25 Jan 2004 - IsaacGouy) |
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| <<O>> Difference Topic NiceVersusScala (r1.9 - 25 Jan 2004 - IsaacGouy) |
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Deleted: | ||||||||
| < < | (2) Although the typechecking isn't completely implemented yet So wouldn't that be Not yet, or Not complete? | |||||||
| <<O>> Difference Topic NiceVersusScala (r1.8 - 24 Jan 2004 - IsaacGouy) |
| Changed: | |
| < < | Nice and Scala move forward OO programming in different ways. Nice addresses the problems of adding functionality to existing classes and binary methods with Multi Methods; Scala addresses the problem of implementation reuse with Traits and Mixins. |
| > > | Nice and Scala move forward OO programming in different ways. Nice addresses the problems of adding functionality to existing classes and binary methods with Multi Methods; Scala addresses the problem of implementation reuse with Traits and Mixins. |
| <<O>> Difference Topic NiceVersusScala (r1.7 - 24 Jan 2004 - IsaacGouy) |
| Changed: | ||||||||||||||||||||||
| < < | There are also fundamental differences: Scala has far less in common with Java (Scala targets CLR as-well-as JVM), single dispatch, F Bounded Polymorphism. | |||||||||||||||||||||
| > > | There are also fundamental differences: Scala has far less in common with Java (Scala targets CLR as-well-as JVM), Scala uses single dispatch, and has a different type system (nuObj). | |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < |
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Deleted: | ||||||||||||||||||||||
| < < | (1)I don't see any difference between traits in Scala and interfaces with default implementation in Nice I'd like that! Traits can include method implementations not just declarations | |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < |
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < |
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < | Although Scala can use Java classes (and in the future .Net classes) there's no intent to make the language familiar to Java programmers; Nice looks more like a Java 3.0 than an entirely new language. | |||||||||||||||||||||
| > > | Although Scala can use Java classes (and in the future .Net classes) there's no intent to make the language familiar to Java programmers; Nice looks a little more like a Java 2.0 than an entirely new language. | |||||||||||||||||||||
| Added: | ||||||||||||||||||||||
| > > |
Some of these differences can be seen in the following example. In Scala we use a HashMap defined in a Scala library; in Nice we parameterize the Java HashMap. In Scala we use a sequence comprehension; in Nice an extended for statement, or a Java for statement.
| |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < |
Other
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Deleted: | ||||||||||||||||||||||
| < < | (3) Has Scala no restrictions on local type inference? | |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < | Seems to work for monomorphic and polymorphic local variables, and non-recursive functions | |||||||||||||||||||||
| > > |
Other
| |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < | Grateful for the help, I'll continue to add stuff too - then we can reconcile the differences and clean up. (I started off including the list of features from the Scala overview and then removed some.) | |||||||||||||||||||||
| > > | Grateful for the help, I'll continue to add stuff too - then we can reconcile the differences and clean up. (I started off including the list of features from the Scala overview and then removed some.) -- IsaacGouy - 24 Jan 2004 | |||||||||||||||||||||
| <<O>> Difference Topic NiceVersusScala (r1.6 - 24 Jan 2004 - IsaacGouy) |
| Changed: | |||||||||||||||||||
| < < | There are also fundamental differences: Scala has far less in common with Java (Scala targets CLR as-well-as JVM), single dispatch (with traits and mixins), F Bounded Polymorphism. | ||||||||||||||||||
| > > | There are also fundamental differences: Scala has far less in common with Java (Scala targets CLR as-well-as JVM), single dispatch, F Bounded Polymorphism. | ||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | Nice and Scala move forward OO programming in different ways. Nice addresses the problems of adding functionality to existing classes and binary methods with Multi Methods; Scala addresses the problem of implementation reuse with Traits and Mixins. | ||||||||||||||||||
| > > | Nice and Scala move forward OO programming in different ways. Nice addresses the problems of adding functionality to existing classes and binary methods with Multi Methods; Scala addresses the problem of implementation reuse with Traits and Mixins. | ||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < | I'd like that! Traits can include method implementations not just declarations (Traits are classes without state) | ||||||||||||||||||
| > > | I'd like that! Traits can include method implementations not just declarations | ||||||||||||||||||
| Changed: | |||||||||||||||||||
| < < |
| ||||||||||||||||||
| > > |
| ||||||||||||||||||
| <<O>> Difference Topic NiceVersusScala (r1.5 - 24 Jan 2004 - IsaacGouy) |
| Changed: | ||||||||
| < < | Scala has many things in common with Nice: "Scala is a modern multi-paradigm programming language designed to express common programming patterns in a consise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages". There are also fundamental differences: Scala uses single dispatch (with traits and mixins). | |||||||
| > > | Scala has many things in common with Nice: "Scala is a modern multi-paradigm programming language designed to express common programming patterns in a consise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages". There are also fundamental differences: Scala has far less in common with Java (Scala targets CLR as-well-as JVM), single dispatch (with traits and mixins), F Bounded Polymorphism. | |||||||
| Added: | ||||||||
| > > | Nice and Scala move forward OO programming in different ways. Nice addresses the problems of adding functionality to existing classes and binary methods with Multi Methods; Scala addresses the problem of implementation reuse with Traits and Mixins. | |||||||
| Added: | ||||||||
| > > | I'd like that! Traits can include method implementations not just declarations (Traits are classes without state) | |||||||
| Changed: | ||||||||
| < < |
Java Compatibility | |||||||
| > > |
So wouldn't that be Not yet, or Not complete?
Java Commonality | |||||||
| Added: | ||||||||
| > > | Although Scala can use Java classes (and in the future .Net classes) there's no intent to make the language familiar to Java programmers; Nice looks more like a Java 3.0 than an entirely new language. | |||||||
| Changed: | ||||||||
| < < |
| |||||||
| > > |
| |||||||
| Added: | ||||||||
| > > | Seems to work for monomorphic and polymorphic local variables, and non-recursive functions | |||||||
| Deleted: | ||||||||
| < < | -- IsaacGouy - 22 Jan 2004 | |||||||
| Changed: | ||||||||
| < < | Made a few additions. | |||||||
| > > | Made a few additions -- ArjanB - 24 Jan 2004 | |||||||
| Changed: | ||||||||
| < < | -- ArjanB - 24 Jan 2004 | |||||||
| > > | Grateful for the help, I'll continue to add stuff too - then we can reconcile the differences and clean up. (I started off including the list of features from the Scala overview and then removed some.) | |||||||
| <<O>> Difference Topic NiceVersusScala (r1.4 - 24 Jan 2004 - ArjanB) |
| Changed: | ||||||||||||||||||||||
| < < |
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Added: | ||||||||||||||||||||||
| > > | (1)I don't see any difference between traits in Scala and interfaces with default implementation in Nice | |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < |
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < |
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Added: | ||||||||||||||||||||||
| > > | (2) Although the typechecking isn't completely implemented yet | |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < |
| |||||||||||||||||||||
| > > |
| |||||||||||||||||||||
| Added: | ||||||||||||||||||||||
| > > | (3) Has Scala no restrictions on local type inference? | |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < | Does this mean that you want to make the comparison? | |||||||||||||||||||||
| > > | Made a few additions. | |||||||||||||||||||||
| Changed: | ||||||||||||||||||||||
| < < | -- ArjanB - 22 Jan 2004 | |||||||||||||||||||||
| > > | -- ArjanB - 24 Jan 2004 | |||||||||||||||||||||
| <<O>> Difference Topic NiceVersusScala (r1.3 - 24 Jan 2004 - IsaacGouy) |
| Changed: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| < < | Scala | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| > > |
ScalaScala has many things in common with Nice: "Scala is a modern multi-paradigm programming language designed to express common programming patterns in a consise, elegant, and type-safe way. It smoothly integrates features of object-oriented and functional languages". There are also fundamental differences: Scala uses single dispatch (with traits and mixins).Classes
Methods
Type Parameters
Java Compatibility
Other
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| <<O>> Difference Topic NiceVersusScala (r1.2 - 22 Jan 2004 - ArjanB) |
| Added: | |
| > > | Does this mean that you want to make the comparison? -- ArjanB - 22 Jan 2004 |
| <<O>> Difference Topic NiceVersusScala (r1.1 - 22 Jan 2004 - IsaacGouy) |
| Added: | |
| > > | %META:TOPICINFO{author="IsaacGouy" date="1074785426" format="1.0" version="1.1"}% %META:TOPICPARENT{name="LanguageComparisons"}% Scala -- IsaacGouy - 22 Jan 2004 |
| Topic NiceVersusScala . { View | Diffs | r1.22 | > | r1.21 | > | r1.20 | More } |
|
Revision r1.1 - 22 Jan 2004 - 15:30 GMT - IsaacGouy Revision r1.22 - 26 Jul 2005 - 07:21 GMT - TWikiGuest |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |