Code Monkey home page Code Monkey logo

Comments (5)

ArcticLampyrid avatar ArcticLampyrid commented on May 16, 2024

I do not think keywords will make a language complex.

from k.

kulics avatar kulics commented on May 16, 2024

@1354092549
emmmm 可以用中文吧?我也不认为关键词复杂。
不是因为关键词太复杂我就去掉了它。
是因为 Lite 的语法层次很简单,不需要用关键字来描述也可以表达逻辑,没必要再抱着以前的关键词用,就换成了现在的符号。
一共就几个语法,?跟判断相关,@跟循环相关,->跟函数和结构相关,就没了。
别的都是常见的语法,在很多语言里都有。

总结回答一下:“可以用关键词,但是没有必要”。

from k.

ArcticLampyrid avatar ArcticLampyrid commented on May 16, 2024

感谢作者解答

from k.

LazyWolfLin avatar LazyWolfLin commented on May 16, 2024

使用语法糖代替关键字,代码阅读上似乎稍微麻烦一些?

from k.

kulics avatar kulics commented on May 16, 2024

@LazyWolfLin
对于不熟练的人来说,是的。
这个道理很简单,如果没有学过加法的符号,1 add 1 比 1 + 1 更简单,更语义化。
但是对于大量内容,学习并且熟练符号的,处理 1+2+3+4+5+6+7 就比用关键字就要清晰的多。
一样的道理,既然编程语言常用语法来来去去就那些,用尽量少的语法糖描述大部分功能,对于要大量编写和阅读代码的人就是极其有益的。
我用Lite写项目的时候没有丝毫的麻烦,甚至还有点舒适(滑稽

from k.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.