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的更多相关文章

  1. 如何将 Cortana 与 Windows Phone 8.1 应用集成 ( Voice command - Natural language recognition )

    随着 Windows Phone 8.1 GDR1 + Cortana 中文版的发布,相信有很多用户或开发者都在调戏 Windows Phone 的语音私人助理 Cortana 吧,在世界杯的时候我亲 ...

  2. Natural Language Processing with Python - Chapter 0

    一年之前,我做梦也想不到会来这里写技术总结.误打误撞来到了上海西南某高校,成为了文科专业的工科男,现在每天除了膜ha,就是恶补CS.导师是做计算语言学的,所以当务之急就是先自学计算机自然语言处理,打好 ...

  3. Deep Learning for Natural Language Processing1

    Focus, Follow, and Forward Stanford CS224d 课程笔记 Lecture1 Stanford CS224d 课程笔记 Lecture1 Stanford大学在20 ...

  4. <Natural Language Processing with Python>学习笔记一

    Spoken input (top left) is analyzed, words are recognized, sentences are parsed and interpreted in c ...

  5. 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 ...

  6. How 5 Natural Language Processing APIs Stack Up

    https://www.programmableweb.com/news/how-5-natural-language-processing-apis-stack/analysis/2014/07/2 ...

  7. 论文笔记: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 ...

  8. Parsing Natural Scenes and Natural Language with Recursive Neural Networks-paper

    Parsing Natural Scenes and Natural Language with Recursive Neural Networks作者信息: Richard Socher richa ...

  9. 论文笔记:Tracking by Natural Language Specification

    Tracking by Natural Language Specification 2018-04-27 15:16:13  Paper: http://openaccess.thecvf.com/ ...

随机推荐

  1. dsoframer控件学习小结(打开WORD,EXCEL等文件)

    根据自己对dsoframer控件的学习,想把dsoframer控件进行简单的包装为C#的usercontrol,大体需要作如下:(创建windows的usercontrol的步骤就不再说了...)我们 ...

  2. 提高FOR插入数据库动作的优化代码

    await Task.Factory.StartNew(() => Parallel.ForEach(result.data.o, s => { sql = "insert in ...

  3. Android 中ViewPagerIndicator的使用

    1.https://github.com/JakeWharton/Android-ViewPagerIndicator 2.http://blog.csdn.net/xiaanming/article ...

  4. Oracle导入dmp备份文件到不同的表空间中

    原文链接:http://www.2cto.com/database/201211/171081.html 将DMP导入到不同的表空间中 1,用imp导出数据    cmd进入orcle安装目录bin下 ...

  5. 使用linux mint 安装无线网卡驱动

    新买了个笔记本Thinkpad E440,用了两天发现无线网非常不稳定,有时候能搜到wifi却连不上,有时候连上了却连不上互联网,于是决定重新安装个网卡驱动. 首先看看自己显卡的型号: lspci : ...

  6. Spark源码系列(九)Spark SQL初体验之解析过程详解

    好久没更新博客了,之前学了一些R语言和机器学习的内容,做了一些笔记,之后也会放到博客上面来给大家共享.一个月前就打算更新Spark Sql的内容了,因为一些别的事情耽误了,今天就简单写点,Spark1 ...

  7. 【redmine】密码忘了后重新设置

    有段时间没有使用,忘记了原来的密码,搜索网上有一篇文章,不过版本比较老,和现在文件位置不一样,参考后成功重置了密码,感谢原作者. 原文内第一步一般是不需要的.主要是用ruby命令修改数据库内容. 进入 ...

  8. Apache2.4中开通HTTP基本认证

    Apache2.4中开通HTTP基本认证,需要在Apache的配置文件中增加如下代码 WSGIPassAuthorization On 否则则无法认证

  9. ux.form.field.SearchField 列表、树形菜单查询扩展

    //支持bind绑定store //列表搜索扩展,支持本地查询 //支持树形菜单本地一级菜单查询 Ext.define('ux.form.field.SearchField', { extend: ' ...

  10. FFmpeg编译出错_img_convert 找不到

    问题出现在下载的ffmpeg的版本不一样,在0.4.8以前的版本中还有img_convert这个函数,新版本中用sws_getContext和sws_scale代替了.简单说明如下: 新版本的ffmp ...