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/ ...
随机推荐
- xsocks 64位平台下编译问题小记
1.src/common/public.h uint32_t lpParameter 改为 void* lpParameter; 2.SocksMgr.cpp DWORD WINAPI CSocksM ...
- HttpRequest重写,解决资源战胜/链接超时/分块下载事件通知 问题。
/************************************************************************************** 文 件 名: WebRe ...
- WCF 遇到的问题
1.只有项目的net版本2.0以上的才可以引用到wcf的类库 2.HTTP 错误 404.17 - Not Found 映射问题 WCF服务建立好,提示这个错误,缺少映射问题,要将应用程序池和项 ...
- Linux高级编程--09.线程互斥与同步
多个线程同时访问共享数据时可能会冲突,比如两个线程都要把某个全局变量增加1,这个操作在某平台需要三条指令完成: 从内存读变量值到寄存器 寄存器的值加1 将寄存器的值写回内存 假设两个线程在多处理器平台 ...
- codeforces George and Job
/* 题意:给一个长度为n的序列, 从中选择长度为m的k个区间(任意两个区间不会有公共部分) 使得所选择的区间的和最大! 思路:这是一种很常见的dp dp[i][j] 表示的是前 i 个数选择 j 个 ...
- linux VM复制多个IP配置出错的处理
device eth0 does not seem to be present, delaying initialization (2012-09-13 21:16:38) 转载▼ 标签: 杂谈 ...
- webapp,liveapp: 流式布局和rem布局
liveapp场景应用,一般针对的是移动端,近来也是很火,颇有一些感受,拿来分享一下. 页面宽度范围: 一般移动端页面我们的像素范围是320px-640px,最大640px,最小320px,所以设计稿 ...
- JS阻止鼠标滚动
var scrollFunc=function(e){ e=e || window.event; if (e.stopPropagation) e.stopPropagation(); else e. ...
- 透过WebGL 3D看动画Easing函数本质
50年前的这个月诞生了BASIC这门计算机语言,回想起自己喜欢上图形界面这行,还得归功于当年在win98下用QBASIC照葫芦画瓢敲了一段绘制奥运五环的代码,当带色彩的奥运五环呈现在自己面前时我已知道 ...
- C#序列化JSON
public static string ConvertToJsonString<T>(T instance) { using (MemoryStream stre ...