Natural language style method declaration and usages in programming languages
More descriptive way to declare and use a method in programming languages
At present, in most programming language, a method is declared in few parts:
keyword, method name, method parameters and return type etc.
E.g.
function int add(int a, int b)
\\ The way to use it:
int r = add(2, 3)
new way: Natural language style method declaration and usages in programming languages
idea
The idea is to split a method name into multiple parts, and put parameters before/between/after these name parts.
Example 1:
function int (int a)add(int b)
\\ usage:
r = (2) add (3)
\\ or
r = 2 and 3
Example 2:
function void save(Employee employee)with(EmployeeSaveOptions options)
\\ usage:
save(employee)with(options)
\\ or
save employee with options
Example 2:
function (int a)add(int b) result is (return int)
\\ usage:
int r = (2) add (3)
\\ or
int r = 2 and 3
\\ or
(2) add (3) result is int r
Explanation
- For each parameter part, it may includes 0+ parameter(s).
- For return data type, we may use parameter style with a keyword return inside, e.g. result is (return (DataType))
Advantage
The new way makes code is more readable.
Natural language style method declaration and usages in programming languages的更多相关文章
- 如何将 Cortana 与 Windows Phone 8.1 应用集成 ( Voice command - Natural language recognition )
随着 Windows Phone 8.1 GDR1 + Cortana 中文版的发布,相信有很多用户或开发者都在调戏 Windows Phone 的语音私人助理 Cortana 吧,在世界杯的时候我亲 ...
- Natural Language Processing with Python - Chapter 0
一年之前,我做梦也想不到会来这里写技术总结.误打误撞来到了上海西南某高校,成为了文科专业的工科男,现在每天除了膜ha,就是恶补CS.导师是做计算语言学的,所以当务之急就是先自学计算机自然语言处理,打好 ...
- Deep Learning for Natural Language Processing1
Focus, Follow, and Forward Stanford CS224d 课程笔记 Lecture1 Stanford CS224d 课程笔记 Lecture1 Stanford大学在20 ...
- <Natural Language Processing with Python>学习笔记一
Spoken input (top left) is analyzed, words are recognized, sentences are parsed and interpreted in c ...
- spaCy is a library for advanced natural language processing in Python and Cython:spaCy 工业级自然语言处理工具
spaCy is a library for advanced natural language processing in Python and Cython. spaCy is built on ...
- How 5 Natural Language Processing APIs Stack Up
https://www.programmableweb.com/news/how-5-natural-language-processing-apis-stack/analysis/2014/07/2 ...
- 论文笔记:Dynamic Multimodal Instance Segmentation Guided by Natural Language Queries
Dynamic Multimodal Instance Segmentation Guided by Natural Language Queries 2018-09-18 09:58:50 Pape ...
- Parsing Natural Scenes and Natural Language with Recursive Neural Networks-paper
Parsing Natural Scenes and Natural Language with Recursive Neural Networks作者信息: Richard Socher richa ...
- 论文笔记:Tracking by Natural Language Specification
Tracking by Natural Language Specification 2018-04-27 15:16:13 Paper: http://openaccess.thecvf.com/ ...
随机推荐
- jeos没有消亡,但看 debian 的 netinst .iso格式,那就是jeos的系统!
曾经ubuntu推出专供轻量硬件(如虚拟机)方式的just os格式的.iso [小巧.轻量.快速.干净] 但在 ubuntu 8.04后 再也没有继续 ...... 可惜 不曾想,ubuntu的老爸 ...
- MVC4研发中遇到问题【持续总结....】
第一: 编译器错误消息: CS0012: 类型“System.Data.Objects.DataClasses.EntityObject”在未被引用的程序集中定义.必须添加对程序集 “System.D ...
- 刨根问底U3D---从Profile中窥探Unity的内存管理
这篇文章包含哪些内容 这篇文章从Unity的Profile组件入手,来探讨一下Unity在开发环境和正式环境中的内存使用发面的一些区别, 并且给出了最好控制内存的方法(我想你已经知道了...Prefa ...
- Java帮助文档的生成
首先需要对代码加上文档的注释,比如下面这样: package wz.learning; /** * Title:Person<br> * Description: ...
- linux下 C++ 读取mat文件 MATLAB extern cyphon scipy 未完待续
1.使用Matlab的C扩展,需要用户安装matlab. g++ -L/media/exsoftware/MATLAB/R2013b/bin/glnxa64 -Wl,-rpath,/media/exs ...
- BZOJ 1006 [HNOI2008] 神奇的国度(简单弦图的染色)
题目大意 K 国是一个热衷三角形的国度,连人的交往也只喜欢三角原则.他们认为三角关系:即 AB 相互认识,BC 相互认识,CA 相互认识,是简洁高效的.为了巩固三角关系,K 国禁止四边关系,五边关系等 ...
- Sharepoint 2013列表视图和字段权限扩展插件(免费下载)!
记得2014年春节期间,有博客园的网友通过QQ向我咨询Sharepoint 2013列表视图和字段权限扩展,因为之前他看到我博客介绍Sharepoint 2010列表视图和字段的权限控制扩展使用,问有 ...
- XPS 15 9530使用Windows10频繁发生Intel HD Graphics 4600驱动奔溃的一种解决方法
本人使用XPS 15 9530.集成显卡为Intel HD Graphics 4600.操作系统Windows 10 Pro,使用过程当中经常会发生集成显卡奔溃的问题,错误提示如下: Display ...
- B2B多商铺初期权限数据库设计
项目从无到有,两个月了.一期完成. 权限目前还很简单.USER表,ROLE表,RESOURCE表三个. 目前只有两个商铺.id是0的是我们自己,作为后台运维管理,也抽象成一个商铺,id为0.另一个商铺 ...
- JavaScript 变量生命周期
变量在它声明时初始化. 局部变量在函数调用时创建,当函数执行完毕后销毁,这和为什么要使用闭包也有一点关系,当然这是另外的话题了. 全局变量在页面(当前页面)关闭后销毁.