Skip to main content
32 events
when toggle format what by license comment
Aug 8, 2018 at 5:30 history edited Leo B.
edited tags
Jul 4, 2018 at 5:21 answer added Scott Franco timeline score: 4
Jun 26, 2018 at 5:07 comment added dave_thompson_085 @JeremyP: algol uses a keyword, but the same one for both valued and nonvalued: PROCEDURE in a60, PROC in a68 (which abbreviated other things too). PL/I allows either of those. Pascal and Ada split to PROCEDURE and FUNCTION; Fortran already had SUBROUTINE and FUNCTION. Original Bourne shell had and POSIX/SUS still has only the parentheses foo() syntax; the Korn function foo syntax is a common extension but not universal. Although shell is scriptable, I'd call awk and perl more 'programmy' and those use function and sub respectively.
May 15, 2018 at 9:15 comment added JeremyP @i486 Well let's be honest. Most of the World's programming will be in VBA macros for Excel. Also don't forget Javascript which is on course to take over the world (sadly).
May 14, 2018 at 17:18 comment added i486 @JeremyP Please compare the world share of usage of C/C++ and Algol + Ada. Do you see difference? Maybe 99.9% to 0.1%. Exotic, archaic and never widely used languages.
May 14, 2018 at 15:32 comment added JeremyP @i486 What languages remain? Python, Swift, Go, Kotlin, Pascal, Algol, Ada, Shell script, Basic, Haskell, Rust. You need to get out more and try some well designed languages. There's more to life than C and its immediate descendants.
May 12, 2018 at 7:54 history edited JeanPierre CC BY-SA 4.0
edited title
May 10, 2018 at 13:16 comment added i486 @JeremyP "This is why almost no other languages follow its lead. Off the top of my head I can think of only Java and C++." - you can add also C#. And when we get C/C++/C# and Java - what other languages remain? These four are major and keep 90%+ of the real programming (of real and fundamental software, not experiments and exercises).
May 10, 2018 at 13:13 comment added JeremyP @i486 Also Unix was not the first operating system to be written in a high level language. It was preceded by MCP for the Burroughs large machine architecture, which was written in ALGOL which is the direct ancestor to Pascal and has PROCEDURE and FUNCTION.
May 10, 2018 at 13:08 comment added JeremyP @i486 I said most modern languages have an equivalent to PROCEDURE and FUNCTION not just Pascal, although most don't differentiate between the two. For example, in Swift functions are defined using the func keyword. It makes the compiler easier to design and the code easier to read (for everybody, not just beginners).
May 10, 2018 at 5:53 comment added tofro @i486 Pascal needed the FUNCTION and PROCEDURE prologs because it supported nested constructs of them. If C would support nesting of procedures (which it doesn't), it would most probably have the same keywords.
May 9, 2018 at 16:16 comment added Cubic @Luaan I reiterate. Lisp machines weren't a thing when Unix development happened. Lisp was used by researchers, but no sane person would've considered writing an OS based on Lisp at the time (hence, no one did).
May 9, 2018 at 13:39 comment added Luaan @i486 Most OSes at the time were written in assembly, yes. C was unique in how easy it was to port to other architectures - it was more like a high-level assembly than a full blown programming language. Today's assembly languages do more advanced stuff than C did back in the day. And as much as I like Linus Torvalds, by that point C was already a popular language in wide use for everything and their kitchen sink. I doubt he did any deliberations on what language to use. And since you referred to his design decisions, take a note of what he thinks about "saving characters" in the source code :)
May 9, 2018 at 13:31 comment added Luaan @Cubic I'm talking about Lisp machines, not common lisp, though I'm not sure what common lisp has to do with anything. It's not like the Unix guys waited for "standard C" to write their OS - they just used what they had (and improved it as necessary).
May 9, 2018 at 10:21 comment added Cubic @Luaan Lisp wasn't the obvious choice at the time, it wasn't even an option. Common Lisp didn't exist yet (although of course there were other lisp implementations), and it would be another couple of decades for Lisp Compilers to come out that both ran fast and produced fast code. at (i486): Text I/O might've sucked at the time, but text I/O never sucked so hard that it actually was a limiting factor during development. If writing fewer characters would lead to faster development we'd all be writing in codegolf languages.
May 9, 2018 at 9:56 comment added user207421 @Luaan The distinction between PROCEDURE and FUNCTION is has nothing to do withnil, and is not a rate-determining step in a Pascal compiler. A bicycle is a motorbike without an engine, not the other way around. Lisp was never an obvious choice for writing operating systems at any time.
May 9, 2018 at 9:25 comment added i486 @Luaan Which Apple II OS is written in Pascal? Maybe UCSD which is not OS for Apple II (only) and is the most dramatic thing useful only for education. All other OS-s are written in assembly - or you don't agree? The development is slower of course because of all PROCEDURE/FUNCTION and := assignments. All extra characters need time to enter and time to read on screen. Linux is written decades after Unix not by the guys who wrote C. But it is not in Pascal. Is this mistake?
May 9, 2018 at 9:17 comment added Luaan @i486 The motorbike is a bicycle, just without an engine. Totally the same, right? Unix is written in C because the guys who wrote the original Unix also wrote C. LISP would have been the obvious go-to language at the time. Pascal was used for the Apple II's OS, and they certainly didn't complain "the development was slower than with C" - quite the opposite. The vast majority of the code you write in Pascal was much simpler than in C, and the rest you probably wanted written in assembly anyway. Suggesting that having to type "procedure" makes Pascal "slower to code" is ridiculous.
May 9, 2018 at 9:01 comment added i486 @Luaan The procedure is a function without return value. Or there is something different? Are they both sequences of commands - yes. Maybe you can answer why Unix and Linux are written in C, and not in Pascal? The compilation would be very fast... The development will be slow but this is not important ...(irony)
May 9, 2018 at 8:54 comment added Luaan @i486 It's one of those little things that allowed Turbo Pascal to be the unbelievably fast compiler that it was (and even more so if you didn't have a hard drive). But the logic is quite simple - procedures and functions are different things. Why would you define them the same way? They're different things in C too; void is not a real type. What's the benefit of doing it the C way? Some languages do treat procedures as functions that return e.g. unit, but C is not one of those languages.
May 8, 2018 at 20:49 comment added Wayne Conrad Re pascal's PROCEDURE and FUNCTION keywords: Pascal's syntax is largely a result of the first Pascal compiler being recursive descent. For that, you have to be able to tell what you're parsing with only one token of lookahead.
May 8, 2018 at 18:20 comment added i486 @JeremyP Pascal syntax is oriented to beginners - to help beginner understand (or think that understands) the program. C syntax is oriented to professionals. If you think that any programming language exists or is necessary only for beginners, then Pascal is the "winner". I don't think.
May 8, 2018 at 14:36 comment added JeremyP @i486 Actually, C's decision not to have a keyword for function (or type) declaration is problematic for compilers and humans. This is why almost no other languages follow its lead.Off the top of my head I can think of only Java and C++.
May 8, 2018 at 12:03 comment added i486 Because this is Pascal. There is no such logic as "simply". Why you have to write PROCEDURE and FUNCTION for every function - in C there is no keyword for this, it is obvious and defined by the context.
May 7, 2018 at 16:32 review Suggested edits
May 7, 2018 at 17:19
May 7, 2018 at 13:55 answer added phuclv timeline score: 5
May 7, 2018 at 12:52 answer added Jules timeline score: 66
May 7, 2018 at 11:07 answer added Leo B. timeline score: 20
May 7, 2018 at 10:08 comment added tofro You could fantasize on implementations where NIL could be a function that would return different values over time.
May 7, 2018 at 8:04 answer added Anonymous timeline score: 3
May 7, 2018 at 7:39 review First posts
May 7, 2018 at 13:21
May 7, 2018 at 7:36 history asked JeanPierre CC BY-SA 4.0