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. Xcode 8 新特性

    在2016 苹果全球开发者大会(WWDC)期间, 苹果一如既往地给开发者们披露了新版的集成开发工具 – Xcode, 在过去的每一次大版本发布中,苹果都会积极地改进开发工具,添加一些极具吸引力的新功能 ...

  2. dnspod动态域名使用感受

    继花生壳不能用之后,3322也开始不太好用了,首先就是360把所有3322的域名全部判定为危险域名,甚至拦截程序对于3322url的api请求. 所以想把3322换成我们自己的独立域名,但是3322他 ...

  3. JQM[jquery mobile] 实战经验汇总

    动态装载的子页面(data-role=”page”),完全不用page div之外的tag,也不会起作用.子页面的javascript脚本必须写在page的</div>之前. 切换按钮(a ...

  4. 【Xamarin报错】 COMPILETODALVIK : UNEXPECTED TOP-LEVEL error java.lang.OutOfMemoryError: Java heap space

    Xamarin Android 编译报错: COMPILETODALVIK : UNEXPECTED TOP-LEVEL error java.lang.OutOfMemoryError: Java ...

  5. 在使用sqlite时淌过的坑

    以前一直用sqlite.net 1.0.66.0版本,在.net4下面程序写好了部署到目的地机器时winform程序总是出现缺少运行时的问题.有时装了运行时也还是出问题,后来发现是混合模式的问题,当时 ...

  6. mysql 显示行号,以及分组排序

    建表: CREATE TABLE `my_tb` ( `id` ) NOT NULL AUTO_INCREMENT, `parent_code` ) DEFAULT NULL, `code` ) DE ...

  7. JDBC数据库编程基本流程

    1.加载驱动类 Class.forName("");   2.创建数据库连接 Connection con = DriverManager.getConnection(url, u ...

  8. svn diff excel

    https://github.com/solq360/compareExcel jdk 1.7 可自己编译1.6 每个sheet第一行不允许为空 SVN对比excel差异 适合策划.财务职业使用 sv ...

  9. ecslipe cdt lib link

    项目属性-> settings -> mingw c linker 1.libs search 填写lib路径 2.lib 填写文件名,不要后缀

  10. C# 128位AES 加密解密 (转)

    /// AES加密 2         /// </summary> 3         /// <param name="inputdata">输入的数据 ...