CLOS : Common Lisp 的面向对象支持
1. defclass ( :accessor/reader/writer ; :initarg ; :initform
2. defgeneric
3. defmethod
--------------
1. 多重继承时的优先级(类似Ruby中的Ancestor Chain)
2. 面向对象的两种模型:
① obj. method (args) —— Java,C++
② obj.send (method, args) === send (obj , method ,args) —— Ruby对此支持
③ method (obj, args) ———— 广义函数,Lisp和Haskell都是这种 。 Lisp可以把特化到多个类型
3. 面向切面AOP支持
:before :after :around
4. 组合机制( combination )
??? 支持多个组合符,可以把所有主方法的结果组合起来
call-next-method : 相当于super
5. 支持 singleton-method (Ruby术语), 即:只为一个特定的instance定义方法。
包机制(package)
和 Haskell的包机制非常相似。
可以控制只导入外部包中的某些符号、只导出本包中的某些符号;
如何处理不同包内的命名冲突 (Haskell 用 as )
CLOS : Common Lisp 的面向对象支持的更多相关文章
- Common Lisp编译程序的小技巧
这几天开始玩Common Lisp,遇上了一个有意思的问题,CL一般是解释运行,也有实现可以编译生成字节码(fas文件).我正在用的两种CL实现是SBCL和CLISP,前者是我从<实用Commo ...
- ANSI Common Lisp Practice - My Answers - Chatper - 3
Ok, Go ahead. 1 (a) (b) (c) (d) 2 注:union 在 Common Lisp 中的作用就是求两个集合的并集.但是这有一个前提,即给的两个列表已经满足集合的属性了.具体 ...
- 搭建fedora开发环境 common lisp, c++, go
第三方软件库: http://download1.rpmfusion.org/free/fedora/releases/25/Everything/x86_64/os/repoview/index.h ...
- Difference between LET and LET* in Common LISP
Difference between LET and LET* in Common LISP LET Parallel binding which means the bindings com ...
- scheme和common lisp 区别
Scheme and Common Lisp use different names for some of the basic system functions. Many Lisp program ...
- slime+sbcl for common lisp
sudo apt-get install slime audo apt-get install sbcl ;;sbcl+slime for common lisp ;;sudo apt-get ins ...
- Common Lisp 编译器IDE环境搭建
搭建Common Lisp编程环境的方法有很多种,这里我使用的是最常见的一种:SBCL + Emacs + SLIME. SBCL是Steel Bank Common Lisp的简称,它是Common ...
- 推动Common Lisp的实际应用
推动Common Lisp的实际应用 推动Common Lisp的实际应用
- Common Lisp第三方库介绍 | (R "think-of-lisper" 'Albertlee)
Common Lisp第三方库介绍 | (R "think-of-lisper" 'Albertlee) Common Lisp第三方库介绍 一个丰富且高质量的开发库集合,对于实际 ...
随机推荐
- woocommerce如何隐藏SKU
有时我们不想在woocommerce网站前台显示SKU,如下图所示,因为sku一多整个排版可能会乱,那么要如何隐藏sku呢?随ytkah一起来看看 在当前主题的function.php文件中加入如下代 ...
- opencv旋转图像,90度标准旋转
摘自opencv 源代码 void rotate(InputArray _src, OutputArray _dst, int rotateMode) { CV_Assert(_src.dims() ...
- (day43)form表单、css
目录 昨日回顾 一.HTTP协议 (一)四大特性 (二)数据格式 (1)请求格式 (2)响应格式 (三)响应状态码 二.HTML (一)什么是HTML (二)注释 (三)文档结构 (四)head内标签 ...
- bdd框架之lettuce
安装 执行 :lettuce (需要在特定的文件夹下) 结果指定到文件中
- git clean (11)
#delete untracked files git clean -f # delete untracked files and directories git clean -fd # -n opt ...
- [LeetCode] 892. Surface Area of 3D Shapes 三维物体的表面积
On a N * N grid, we place some 1 * 1 * 1 cubes. Each value v = grid[i][j] represents a tower of v cu ...
- python实现的WebSocket客户端
code #coding=utf- import json import time from websocket import create_connection ws = create_connec ...
- 打造个人专属网盘nextcloud
原文 https://edu.aliyun.com/course/150/lesson/list?spm=5176.9278281.815111.sence.114d4f3eLLMS53
- 【C/C++开发】C++静态库与动态库以及在Linux和Windows上的创建使用
原文出处: 吴秦的博客 这次分享的宗旨是--让大家学会创建与使用静态库.动态库,知道静态库与动态库的区别,知道使用的时候如何选择.这里不深入介绍静态库.动态库的底层格式,内存布局等,有兴趣的同学 ...
- Kettle提高表输出写入速度(每秒万条记录)
重点: ETL 优化多数在于表输入和表输出. 转自: https://blog.csdn.net/qq_37124304 https://blog.csdn.net/qq_37124304/artic ...