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/ ...
随机推荐
- CentOS 7.0系统安装配置LAMP服务器(Apache+PHP+MariaDB)
CentOS 7.0接触到的用户是比较少的,今天看了站长写了一篇关于centos7中安装配置LAMP服务器的教程,下面我把文章稍加整理一下转给大家学习交流,希望例子能给各位带来帮助哦. cento ...
- Request is not available in this context
部署到新服务器的IIS的时候发现这个错误: Request is not available in this context 解决方案: <system.web> <customEr ...
- Struts2的属性驱动与模型驱动的区别
1.Struts2的属性驱动. Struts2的属性驱动指的是在action中JSP页面的每一个form中的name都对应在action中有一个属性与之对应.看下面代码片段: <form act ...
- Hybris电商方案介绍(企业全渠道) B2B B2C O2O建设
1). 什么是Hybris: hybris software成立于1997年,2013年与SAP整合,成为SAP旗下的一份子,提供全渠道客户互动与商务解决方案,该解决方案能够为各机构提供客户的实时背景 ...
- Backbone之旅——Model篇
Backbone作为前端的MVC框架,把后端的设计思想带到前端,使前端代码更加清晰.可维护性大大提高 Backbone依赖于underscore.js和jquery,所以在使用backbone的时候一 ...
- VMware虚拟机无法识别U盘解决方案
1. 本机情况: Win7操作系统,VMware虚拟机,虚拟机版本:VMware 7.1,安装Ubuntu10.10,现要求在主机上插入U盘,在虚拟机中显示. 2. 遇到问题: U盘只在Win7主 ...
- HTML CSS——margin和padding的学习
你在学习margin和padding的时候是不是懵了,——什么他娘的内边距,什么他娘的外边距.呵呵呵,刚开始我也有点不理解,后来通过查资料学习总算弄明白了,现在我来谈一下自己对margin和paddi ...
- 对依赖倒置原则(DIP)及Ioc、DI、Ioc容器的一些理解
1.概述 所谓依赖倒置原则(Dependence Inversion Principle)就是要依赖于抽象,不要依赖于具体.简单的说就是要求对抽象进行编程,不要对实现进行编程,这样就降低了客户与实现模 ...
- 原生js提交表单
/********************* 表单提交 ***********************/ function ajax(options) { options = options || { ...
- svn代码版本管理总结
svn代码版本管理 1.0开发,做dev1.0的branch此时的目录结构svn://proj/ +trunk/ (不负担开发任务) +branches ...