Timeline for What is the term for the side on which a variable type is written in a given language?
Current License: CC BY-SA 4.0
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 13, 2019 at 0:46 | comment | added | Alex Reinking | If you have a clearer term, submit it as an answer. I'll even upvote it. | |
| Jan 13, 2019 at 0:45 | comment | added | Erik Eidt | To say C-style declarations implies much more than merely the type preceding the variables name, though. Ritchie's idea was to declare identifiers in contexts resembling their use: "declaration reflects use". "C is sometimes castigated for the syntax of its declarations... The syntax is an attempt to make the declaration and the use agree; it works well for simple cases, but it can be confusing for the harder ones, because declarations cannot be read left to right, and because parentheses are over-used." C K&R 5.12 pg 122. | |
| Jan 13, 2019 at 0:16 | comment | added | Alex Reinking | Do you expect more programmers today would understand "My new language has C style declarations", or "ALGOL style declarations"? | |
| Jan 13, 2019 at 0:13 | comment | added | Alex Reinking | Well, sure, but does "type theoretic type specification syntax" communicate the idea more effectively than "[Pascal/other popular language]-style declaration syntax" to a broad audience of programmers and software engineers? We shouldn't expect everyone to be familiar with the simply-typed lambda calculus. | |
| Jan 12, 2019 at 23:58 | comment | added | Jörg W Mittag | Having the type on the left was already the case in ALGOL60, twelve years before C, and possibly also in ALGOL58. Having the type on the right was already the case in type theory before programming languages even existed. | |
| Jan 12, 2019 at 22:47 | history | answered | Alex Reinking | CC BY-SA 4.0 |