Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Add "Language Influences" page #11198

Merged
merged 1 commit into from
Apr 22, 2021
Merged

Conversation

franzihei
Copy link
Member

Initial draft for the "language influences" page for the Docs. closes #11130

docs/language-influences.rst Outdated Show resolved Hide resolved
docs/language-influences.rst Outdated Show resolved Hide resolved
Now, the main similarity to JavaScript is that functions are defined using the keyword
``function``. Solidity also supports import syntax and semantics that
are similar to those available in JavaScript. Besides those points, Solidity looks like
most other curly-bracket languages and has no major JavaScript influence anymore.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This sentence comes as we are desperately trying to avoid any association with javascript :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I think we still have to close the narrative somehow since we start the section with "it used to be influenced" etc.

Python's decorators with a much more restricted functionality. Furthermore, multiple inheritance
and the ``super`` keyword are taken from Python as well as the general value semantics of value
and reference types.

Copy link
Member

@hrkrshnn hrkrshnn Mar 31, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add that several Yul optimizer steps have been inspired by llvm's optimization steps. Not exactly about language though. Many of them are generic, and can't really be attributed to llvm. So I'm not sure about this any more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could rather fit into the optimizer section, I would say.

docs/language-influences.rst Outdated Show resolved Hide resolved
docs/language-influences.rst Outdated Show resolved Hide resolved
and the ``super`` keyword are taken from Python as well as the general value semantics of value
and reference types.

Last but not least, ``payable`` was inspired by an, we believe, `unnamed language <https://publications.lib.chalmers.se/records/fulltext/234939/234939.pdf>`_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Last but not least, ``payable`` was inspired by an, we believe, `unnamed language <https://publications.lib.chalmers.se/records/fulltext/234939/234939.pdf>`_
Last but not least, ``payable`` was inspired by, we believe, `unnamed language <https://publications.lib.chalmers.se/records/fulltext/234939/234939.pdf>`_

and the ``super`` keyword are taken from Python as well as the general value semantics of value
and reference types.

Last but not least, ``payable`` was inspired by an, we believe, `unnamed language <https://publications.lib.chalmers.se/records/fulltext/234939/234939.pdf>`_
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure this is really relevant.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just took what was there in the PR and Chris had listed it. :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah but we debated there too :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok so @chriseth wdyt? Keep it or delete it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine with either.


Another influence to Solidity was Python. Solidity's modifiers were added trying to model
Python's decorators with a much more restricted functionality. Furthermore, multiple inheritance
and the ``super`` keyword are taken from Python as well as the general value semantics of value
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super is also present in Javascript.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What should I do with this information? Where was it first?

@hrkrshnn
Copy link
Member

Maybe another influence is doxygen and javadoc (?) on NatSpec.

@axic
Copy link
Member

axic commented Mar 31, 2021

This section should also be linked from the intro page.

@franzihei franzihei force-pushed the docs_lang_insprirations branch from 987519d to ce72ad8 Compare April 1, 2021 14:23
docs/language-influences.rst Outdated Show resolved Hide resolved
@franzihei franzihei requested a review from chriseth April 1, 2021 14:35
@franzihei franzihei force-pushed the docs_lang_insprirations branch from 51d1a5f to 29d2e28 Compare April 20, 2021 16:02
@leonardoalt leonardoalt force-pushed the docs_lang_insprirations branch from 29d2e28 to 3913435 Compare April 22, 2021 08:48
@leonardoalt
Copy link
Member

Rebased

@chriseth chriseth merged commit 2a4a2d8 into develop Apr 22, 2021
@chriseth chriseth deleted the docs_lang_insprirations branch April 22, 2021 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Explain language inspirations in some depth
5 participants