简体   繁体   中英

Why int for integer yet not str for string

I'm not so puzzled as to why int is used for integer, it's shorter that's all. However I don't understand why we don't shorten the string type to str. Eg:

int a = 5
str c = "yeah"

My questions are:

  1. What language first used int instead of integer
  2. Why don't we use str to shorten the string type

I think the usage of int began with ALGOL68 which then influenced C, which influenced Perl, Python, Javascript, Java and of course C++

In ALGOL60 and Fortran you have to write INTEGER.

str for string, is something I only know from Python

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM