Verification of the theory that "Python and Swift are quite similar"

"Python and Swift are pretty similar."

Said. I've finally said it. I kept silent because there was an air that I shouldn't say for some reason, This time, in recent years Language with No. 1 domestic income and No. 1 rate of increase in demand It's not like that ~ "](http://qiita.com/rotors123) I want to cut it in as a Gaiden of the series.

First look at this source comparison. What do you think of this guy? (* Please reply in the comment section)

SwiftVSPython3.6.png

Execution result

Swift version

"Give up, because you are destined to be with a strong woman like me."
~ wife
"Welcome. Live well!"
~ The words that my eldest son, who was 4 years old at the time, hung on me as I was running away from home

Python version

"Strictly be late ⚠️"
~ My wife before marriage and before my first date
"It's quite difficult to keep pretending to be unnoticed ❓️"
~ My wife after marriage

Commentary

--This time, we implemented it according to the flow of the "Dai Pro" series, so we are using Japanese as much as possible for the Python version. Although the 3.x system was better at handling Japanese, it was not possible to use pictograms other than character output, as in the Obj-C version.

――For comparison, it is unreasonable to make the Python version as close as possible to the configuration of the Swift version. (So it's actually more concise, but it's verbose code for Python)

As for the impression that I implemented --Swift semi-forces developers to "readability" and "difficulty in bugs" while following the "write short" theme. --Python emphasizes "short writing" for more efficiency, and extensibility and versatility (although not surfaced this time). I had the impression that ... I think both are great languages.

After all, if you think they are similar, they are similar, and if you want to live, you will be in heaven. I want to fold my brush this time because there are chances to be happy everywhere.

version information

Python version   Python 3.6.1

Swift version   Swift:3.1   Xcode:8.3.3 (Swift Playgrounds)

Source code

Python version   https://github.com/rotors123/ProgrammingNoProgrammingPy.git

Swift version   https://github.com/rotors123/ProgrammingNoProgrammingObjC.git

Recommended Posts

Verification of the theory that "Python and Swift are quite similar"
The story of Python and the story of NaN
This and that of python properties
[Python] I thoroughly explained the theory and implementation of logistic regression
[Python] I thoroughly explained the theory and implementation of decision trees
This and that of the inclusion notation.
Python open and io.open are the same
Summary of the differences between PHP and Python
The contents of the Python tutorial (Chapter 5) are itemized.
The contents of the Python tutorial (Chapter 4) are itemized.
The contents of the Python tutorial (Chapter 2) are itemized.
The answer of "1/2" is different between python2 and 3
The contents of the Python tutorial (Chapter 8) are itemized.
The contents of the Python tutorial (Chapter 1) are itemized.
Specifying the range of ruby and python arrays
The contents of the Python tutorial (Chapter 10) are itemized.
The contents of the Python tutorial (Chapter 6) are itemized.
The contents of the Python tutorial (Chapter 3) are itemized.
About the * (asterisk) argument of python (and itertools.starmap)
A discussion of the strengths and weaknesses of Python
Deep Learning from scratch The theory and implementation of deep learning learned with Python Chapter 3
Build a python environment to learn the theory and implementation of deep learning
[Python] I thoroughly explained the theory and implementation of support vector machine (SVM)
[Python] A program that calculates the number of updates of the highest and lowest records
[Python] A program that counts the number of valleys
About the matter that the contents of Python print are not visible in docker logs
The story of Python without increment and decrement operators.
The process of installing Atom and getting Python running
Python --Explanation and usage summary of the top 24 packages
the zen of Python
Visualize the range of interpolation and extrapolation with python
I checked out the versions of Blender and Python
PHP and Python samples that hit the ChatWork API
Summary of versions of the Python standard library that are now server validated on https
The VIF calculated by Python and the VIF calculated by Excel are different .. ??
The attitude that programmers should have (The Zen of Python)
[Python] A program that compares the positions of kangaroos.
A library that monitors the life and death of other machines by pinging from Python
[Python] A program to find the number of apples and oranges that can be harvested
[Python] Heron's formula functionalization and calculation of the maximum area
Consideration for Python decorators of the type that passes variables
The story of Python and the story of NaN
Python nan check
[python] plot the values ​​before and after the conversion of yeojohnson conversion
Data processing that eliminates the effects of confounding factors (theory)
Introduction to Effectiveness Verification Chapters 4 and 5 are written in Python
I want to know the features of Python and pip
[Tips] Problems and solutions in the development of python + kivy
[Python3] "A // B" and "math.floor (A / B)" are not always the same! ??
Play with the password mechanism of GitHub Webhook and Python
A Python script that compares the contents of two directories
Towards the retirement of Python2
About the ease of Python
About the features of Python
Source installation and installation of Python
The Power of Pandas: Python
The story that the version of python 3.7.7 was not adapted to Heroku
Count the number of Thai and Arabic characters well in Python
Note: Get the first and last items of Python OrderedDict non-destructively
Regular expressions that are easy and solid to learn in Python
A story that struggled to handle the Python package of PocketSphinx
[Introduction to Python] I compared the naming conventions of C # and Python.