Skip to content

Feature: Make "let" keyword for variable assignments in code blocks optional  #4245

@markdoerr

Description

@markdoerr

Description

Dear Typst developers,
first of all I am very much impressed by what is already achieved in the Typst project - it is wonderful !

As a scientist and big admirer of a plain, memorable and simple syntax, I would suggest to make the
"let" keyword in code blocks optional for variable assignments.
Millions of lines of python code do to not need it, and mathematicians and physicists also do not write
their equations with an additional keyword to indicate a variable assignment:

x = 3

looks more familiar to scientist than

let x = 3

The python syntax parser manages to parse these statements well for decades and many young scientist
are familiar with python, so there is no reason to introduce a variable assignment keyword (or any other syntactic overhead) in a scripting environment.

Use Case

Use cases are endless: every superfluous word that does not need to be memorised and written saves time and makes the software more intuitive to be used.

With your experience in text parsing this should be a simple task, will not break the functionality and bring Typst even closer to your motto:
"We strive to make scientific writing simpler, more collaborative, and more fun."

Thanks :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    change requestA proposal for changes to an existing featuresyntaxAbout syntax, parsing, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions