Giter VIP home page Giter VIP logo

Comments (2)

LingDong- avatar LingDong- commented on August 18, 2024 4

Hi there,

Both of you are right, and what you want is already in the language :)

@kahogeoff is already a shorthand for 吾有, using which you can initialize variables like so:

有數五十。名之曰「甲」。

compare to the slightly different 吾有 syntax:

吾有一數。曰五十。名之曰「甲」。

However if you're defining a function this shorthand cannot be used because function definitions typically don't fit into one token unlike 五十.

@alluleia 今有 is already an alias for 吾有. And you can use it exactly as 吾有:

今有一數。曰五十。名之曰「甲」。

Incidentally 今有 was added the the syntax as a tribute to 九章算術, exactly what you mentioned there (while the 吾有一 syntax is partially a tribute to 譚嗣同's famous last words).

Thanks.

from wenyan.

alluleia avatar alluleia commented on August 18, 2024

应更之为"今有"
<九章算术>曰
今有積五萬五千二百二十五步。問︰為方幾何?
荅曰:二百三十五步。
<孙子算经>曰
今有雉、兔同笼,上有三十五头,下有九十四足。问:雉、兔各几何?答曰:雉二十 三,兔一十二

from wenyan.

Related Issues (20)

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.