Comments (5)
I do not think keywords will make a language complex.
from k.
@1354092549
emmmm 可以用中文吧?我也不认为关键词复杂。
不是因为关键词太复杂我就去掉了它。
是因为 Lite 的语法层次很简单,不需要用关键字来描述也可以表达逻辑,没必要再抱着以前的关键词用,就换成了现在的符号。
一共就几个语法,?跟判断相关,@跟循环相关,->跟函数和结构相关,就没了。
别的都是常见的语法,在很多语言里都有。
总结回答一下:“可以用关键词,但是没有必要”。
from k.
感谢作者解答
from k.
使用语法糖代替关键字,代码阅读上似乎稍微麻烦一些?
from k.
@LazyWolfLin
对于不熟练的人来说,是的。
这个道理很简单,如果没有学过加法的符号,1 add 1 比 1 + 1 更简单,更语义化。
但是对于大量内容,学习并且熟练符号的,处理 1+2+3+4+5+6+7 就比用关键字就要清晰的多。
一样的道理,既然编程语言常用语法来来去去就那些,用尽量少的语法糖描述大部分功能,对于要大量编写和阅读代码的人就是极其有益的。
我用Lite写项目的时候没有丝毫的麻烦,甚至还有点舒适(滑稽
from k.
Related Issues (8)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from k.